[FFmpeg-cvslog] r21384 - trunk/libavcodec/vb.c

Kostya kostya.shishkov
Sat Jan 23 12:14:52 CET 2010


On Sat, Jan 23, 2010 at 11:27:25AM +0100, Reimar D?ffinger wrote:
> On Fri, Jan 22, 2010 at 07:28:41PM +0100, kostya wrote:
> > Author: kostya
> > Date: Fri Jan 22 19:28:41 2010
> > New Revision: 21384
> > 
> > Log:
> > Zero palette in case not all entries are initialized later
> > 
> > Modified:
> >    trunk/libavcodec/vb.c
> > 
> > Modified: trunk/libavcodec/vb.c
> > ==============================================================================
> > --- trunk/libavcodec/vb.c	Fri Jan 22 17:12:55 2010	(r21383)
> > +++ trunk/libavcodec/vb.c	Fri Jan 22 19:28:41 2010	(r21384)
> > @@ -254,6 +254,8 @@ static av_cold int decode_init(AVCodecCo
> >      c->frame      = av_malloc( avctx->width * avctx->height);
> >      c->prev_frame = av_malloc( avctx->width * avctx->height);
> >  
> > +    memset(c->pal, 0, sizeof(c->pal));
> > +
> 
> Unless I am missing something this is nonsense, the c->pal is part of the
> context and the context is always 0-initialized.
> Ok to revert (according to valgrind changing the frame allocs to mallocz
> should fix the FATE failure).

If you are sure, feel free to do that. For some reason adding this line
changed CRCs on single frame encoding for me (I tested it on PPC and x86).
Also I suspect it may be CRC operating on data including padding which
affects outcome.



More information about the ffmpeg-cvslog mailing list