[FFmpeg-devel] [PATCH 7/7] Add check in av_write_header() which validates the rawvideo codec tag.

Michael Niedermayer michaelni
Thu Jun 3 02:06:40 CEST 2010


On Wed, Jun 02, 2010 at 07:35:47PM +0200, Stefano Sabatini wrote:
> On date Tuesday 2010-06-01 19:59:55 +0200, Michael Niedermayer encoded:
> > On Tue, Jun 01, 2010 at 07:29:34PM +0200, Stefano Sabatini wrote:
> [...]
> > what is unclear on
> > rgb in avi must use codec_tag=0 ?
> > the raw rgb format in avi is indicated by the number of bits per pixel
> > not by the fourcc which must be set to 0.
> > 
> > 
> > > 
> > > What the code currently implements is just wrong for both AVI and NUT,
> > > in the case of AVI if the pixel format cannot be mapped to any codec
> > > tag, codec_tag is set to 0,
> > 
> > it must be 0 this is as it should be
> > 
> > 
> > > which when reading it is interpreted as
> > > YUV420P,
> > 
> > if so thats a bug and i would suspect a new one
> 
> A possible fix for nut attached.

what bug?
this patch looks just wrong

we need a
if(codec_id == CODEC_ID_RAWVIDEO && rgb)
    codec_tag= 0
in avienc.c before codec_tag is written in the file.

it just doesnt work without that.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20100603/69e2f4e5/attachment.pgp>



More information about the ffmpeg-devel mailing list