[FFmpeg-devel] libx264.c:encode_nals can overwrite buffers

Paul Flinders paul
Sat Jan 1 01:27:12 CET 2011

On 31/12/10 23:40, Paul Flinders wrote:
> Oh **** - too tired! ignore 2nd patch for now

I really shouldn't try to write code on New Year's Eve!! - Happy new 
year BTW :-)

Revised patch attached - calculates the required space and, if 
insufficient, returns without copying data. This allows the caller of 
avcodec_encode_video to dynamically adjust the buffer size (at the cost 
of re-encoding the frame) if the initial allocation was too small.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encode_nals-alternative.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110101/1454c612/attachment.asc>

More information about the ffmpeg-devel mailing list