[Ffmpeg-devel] Fix for overflow issue in mpegvideo.c

Michael Niedermayer michaelni
Tue Jul 26 14:35:10 CEST 2005


Hi

On Tuesday 26 July 2005 13:19, Martin Boehme wrote:
> Michael Niedermayer wrote:
> > On Monday 25 July 2005 17:23, Martin Boehme wrote:
> >>the attached patch fixes an overflow issue I was getting for
> >>(overconservatively) large buffer sizes and large picture heights, i.e.
> >>buf_size=2.5 MB and end_y=1024. I'm aware this buf_size is _much_ too
> >>large (being lazy, I allocate enough buffer for a complete uncompressed
> >>image so I _know_ it will be enough)... OTOH, ffmpeg's (static) buffer
> >>size (256 KB) is already within an order of magnitude of the "critical"
> >>size.
> >
> > applied
> > btw i dont think buf_size=width*height*1.5 is enough, try random 255/0
> > sample values at qp=1, btw2 if you actually try this i would be
> > interrested in the results
>
> Tried it, with MPEG-4 I get about width*height*3.63 bytes per frame...
> ouch. So I now use width*height*4... ;-) under the assumption that the
> above is just about the worst case... (BTW, is that true?)

probably not

[...]
-- 
Michael





More information about the ffmpeg-devel mailing list