[FFmpeg-devel] some minor cleanup (and one leak fix) for dshow

Roger Pack rogerdpack2 at gmail.com
Mon Aug 20 20:46:27 CEST 2012


>> -    unsigned int buffer_fullness = (ctx->curbufsize*100)/s->max_picture_buffer;
>> +    unsigned int buffer_fullness = ((float)ctx->curbufsize*100)/s->max_picture_buffer;
>
> this and the 2nd hunk should use int64_t to avoid rounding issues

Ok that seems to work [see attached].

Also another patch attached to guard curbufsize usage.

Thanks.
-roger-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dshow-avoid-integer-overflow-when-using-curbufsize.patch
Type: application/octet-stream
Size: 710 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120820/4d8fac40/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dshow-protect-access-to-curbufsize-to-promote-consis.patch
Type: application/octet-stream
Size: 889 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120820/4d8fac40/attachment-0001.obj>


More information about the ffmpeg-devel mailing list