[FFmpeg-devel] [PATCH]Fix issue 1474

Michael Niedermayer michaelni
Tue Jan 12 00:08:35 CET 2010


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100112/43745bdf/attachment.pgp>



More information about the ffmpeg-devel mailing list