[PATCH]Fix issue 1474
Hi! Attached patch fixes the samples from issue 1474 - the interlaced ones are shown as they are encoded, with one field above the other. Ok to commit? Carl Eugen
On Mon, Jan 11, 2010 at 11:33:37PM +0100, Carl Eugen Hoyos wrote:
Hi!
Attached patch fixes the samples from issue 1474 - the interlaced ones are shown as they are encoded, with one field above the other.
Ok to commit?
Carl Eugen
avidec.c | 5 +++++ 1 file changed, 5 insertions(+) 7df6cef4bff18eb4d44b783167cbc3edd7ec6822 patchissue1474.diff Index: libavformat/avidec.c =================================================================== --- libavformat/avidec.c (revision 21134) +++ libavformat/avidec.c (working copy) @@ -514,6 +514,11 @@ #ifdef DEBUG print_tag("video", tag1, 0); #endif + // Support "Resolution 1:1" for Avid AVI Codec + if(tag1 == MKTAG('A', 'V', 'R', 'n') && + st->codec->extradata_size >= 31 && + !memcmp(&st->codec->extradata[28], "1:1", 3)) + tag1 = MKTAG('U', 'Y', 'V', 'Y'); st->codec->codec_type = CODEC_TYPE_VIDEO; st->codec->codec_tag = tag1; st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
i think you should override codec_id, not codec_tag the rawvideo decoder then can check extradata /codec_tag to get both progressive and interlaced correctly [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Thouse who are best at talking, realize last or never when they are wrong.
Hi! Michael Niedermayer <michaelni <at> gmx.at> writes:
+ // Support "Resolution 1:1" for Avid AVI Codec + if(tag1 == MKTAG('A', 'V', 'R', 'n') && + st->codec->extradata_size >= 31 && + !memcmp(&st->codec->extradata[28], "1:1", 3)) + tag1 = MKTAG('U', 'Y', 'V', 'Y');
i think you should override codec_id, not codec_tag
the rawvideo decoder then can check extradata /codec_tag to get both progressive and interlaced correctly
Of course. Committed a hopefully (more) correct version... Thank you, Carl Eugen
participants (3)
-
cehoyos@ag.or.at -
cehoyos@rainbow.studorg.tuwien.ac.at -
michaelni@gmx.at