[MPlayer-dev-eng] [PATCH] -demuxer lavf and svq3 mov files

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Jul 31 00:54:02 CEST 2006


On Sun, 2006-07-30 at 18:26 -0400, Alan Curry wrote:
> The patch is in 2 parts. The first part is a bug fix that I think should be
> worthwhile on its own, but I don't have any affected files (AVRn? Pegasus
> MJPEG?) to test it with. Adding sizeof(BITMAPINFOHEADER) to something that's
> already a BITMAPINFOHEADER * just can't be right...

It can be right, especially when it explicitly has a size field. That
means it's not just a constant-size struct but can have more data after
the constant fields. The code now copies the data after the
standard-struct part. I'm not familiar with the format so I don't know
which one is right, but I'd say the original code looks more plausible
than your change.

>  	avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER);
>  	avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
> -	memcpy(avctx->extradata, sh->bih+sizeof(BITMAPINFOHEADER),
> -	    avctx->extradata_size);
> +	memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);

Note the way extradata_size is set. Your change doesn't look right.




More information about the MPlayer-dev-eng mailing list