[FFmpeg-devel] [PATCH] Video decoder and demuxer for AMV files

Aurelien Jacobs aurel
Wed Sep 26 15:37:34 CEST 2007

On Wed, 26 Sep 2007 17:40:21 +0700
"Vladimir Voroshilov" <voroshil at gmail.com> wrote:

> 2007/9/25, Vladimir Voroshilov <voroshil at gmail.com>:
> [...]
> > Fake fourcc code removed.
> > thus Vitor's patch is required too (his codec provides better sound).
> Small nit: AMV files are currently reported as "avi", but strictly
> speaking they are broken AVI files.
> Thus, i suggest to add separate AVInputFormat structure especially for
> AMV files (with apropriate name and comment) and
> register it with AVI's config variable (IOW, REGISTER_DEMUXER (AVI, amv))

I don't think it's worth. I much prefer your previous patch.
Note that you will have to update it (simplify it) according to
my recent commit on avidec.c.

> > I haven't checked the surrounding code but if stream_index can
> > only be 0 or 1, you can replace your whole switch() by:
> >
> >   tag1 = stream_index ? MKTAG('a','u','d','s') : MKTAG('v','i','d','s');  
> I have no info about streams count, so kept as is

I gave a deeper look at the source. My proposition is safe.
tag1 will always be video for the first stream and audio for
the second stream (and all subsequent stream if they happen
to exist).


More information about the ffmpeg-devel mailing list