audio: improve decoder open failure handling
commit6b9567973952ba852d060cf93b4c35bde17bf5a1
authorUoti Urpala <uau@mplayer2.org>
Mon, 26 Nov 2012 02:47:29 +0000 (26 04:47 +0200)
committerUoti Urpala <uau@mplayer2.org>
Wed, 28 Nov 2012 00:17:05 +0000 (28 02:17 +0200)
tree1f74d203f6a5fc317a1c89b8c0e7867bf83d8840
parent91f516f7c74d16eb108013be61e84d476de9914b
audio: improve decoder open failure handling

Fix handling of unsupported lavc output format to prevent an endless
stream of errors on init. Print a more informative error message if
the problem is due to lack of libavresample support. Reinitialize
sh_audio->samplesize and sample_format before falling back to another
audio decoder (some decoders rely on default values). Remove code
setting these fields from demux_mkv and demux_lavf (no decoder should
depend on demuxer-set values for these fields).
libmpcodecs/ad_ffmpeg.c
libmpcodecs/dec_audio.c
libmpdemux/demux_lavf.c
libmpdemux/demux_mkv.c