demux_lavf: assume audio codec_tag 0 means unset
commit5b0ba6f403cc0e17296ca37548f5e4cca6c6a8bc
authorUoti Urpala <uau@mplayer2.org>
Wed, 8 Aug 2012 20:50:23 +0000 (8 23:50 +0300)
committerUoti Urpala <uau@mplayer2.org>
Wed, 8 Aug 2012 20:50:23 +0000 (8 23:50 +0300)
treeed0c6b3f3e06ba4bac98fc09e94f823f140a60f0
parentb9b8aaf8a271ee20c90908ac47573f5ef0285782
demux_lavf: assume audio codec_tag 0 means unset

Libavformat does not distinguish between "no codec_tag given" and
"codec_tag given, value is 0". 0 can be a valid value. Change
demux_lavf to assume that 0 always means unset for audio. This
prevents incorrect selection of the PCM decoder, which includes
"format 0x0" in its codecs.conf entry. The video case accepts 0 iff
codec_id is RAWVIDEO, but there's no obvious similar check possible
for audio. Thus this could possibly cause issues if a file really uses
0 to mean uncompressed audio.
libmpdemux/demux_lavf.c