demux_lavf: set rawvideo codec_tag based on pix_fmt
commit49b2bc59477395370065a22ecbe05a36c246bc73
authorUoti Urpala <uau@mplayer2.org>
Tue, 18 Oct 2011 03:35:31 +0000 (18 06:35 +0300)
committerUoti Urpala <uau@mplayer2.org>
Tue, 18 Oct 2011 03:49:56 +0000 (18 06:49 +0300)
tree1a9d3c4ab59ee9f237c5aa27d7044b16f74e0472
parent75eab4f72af7b10e52ab4f149afb7648b2e145f2
demux_lavf: set rawvideo codec_tag based on pix_fmt

Libav stopped automatically filling missing codec_tag field for raw
codecs based on pix_fmt in libav commit bb416bd68c ("lavf: do not set
codec_tag for rawvideo"). This broke demux_lavf for raw video in
formats like YUV4MPEG, as the video format was not exported from
demux_lavf in any form (the information only existed in the pix_fmt
field of the struct AVCodecContext from libavformat, and that is not
exported). Add an explicit call to avcodec_pix_fmt_to_codec_tag() to
set the codec tag again so that selecting the correct raw decoder
based on the tag works.
libmpdemux/demux_lavf.c