[FFmpeg-devel] [PATCH] Parse the strf mov atom

Baptiste Coudurier baptiste.coudurier
Fri Apr 16 22:30:52 CEST 2010


On 04/16/2010 01:24 PM, Martin Storsj? wrote:
> Hi,
>
> The attached patch makes the mov demuxer parse strf atoms. These atoms are
> BITMAPINFOHEADER (whose content simply is ignored), but they may have
> codec extradata appended at the end, which is extracted.
>
> This patch fixes roundup issue 1270.
>
> // Martin
>
>
> 0001-Parse-the-strf-mov-atom.patch
>
>
>  From 16459324474897c19096b9a39956f0dd9c984530 Mon Sep 17 00:00:00 2001
> From: Martin Storsjo<martin at martin.st>
> Date: Fri, 16 Apr 2010 23:13:47 +0300
> Subject: [PATCH] Parse the strf mov atom
>
> This fixes roundup issue 1270.
> ---
>   libavformat/mov.c |   29 +++++++++++++++++++++++++++++
>   1 files changed, 29 insertions(+), 0 deletions(-)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 0f03da1..16f2551 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -811,6 +811,34 @@ static int mov_read_glbl(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
>       return 0;
>   }
>
> +/**
> + * An strf atom is a BITMAPINFOHEADER struct. This struct is 40 bytes itself,
> + * but can have extradata appended at the end after the 40 bytes belonging
> + * to the struct.
> + */
> +static int mov_read_strf(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
> +{
> +    AVStream *st;
> +
> +    if (c->fc->nb_streams<  1)
> +        return 0;
> +    if (atom.size<  40)
> +        return 0;

<=

It would mean no extradata, except that patch ok.

[...]

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list