[FFmpeg-devel] libx264.c:encode_nals can overwrite buffers
Paul Flinders
paul
Sat Jan 1 00:39:52 CET 2011
On 31/12/10 23:17, Jason Garrett-Glaser wrote:
>
> Can you attach it as a diff? The spacing gets all mucked up when it's
> part of the email.
On reflection it might be better to calculate the required buffer size
and return it to the caller (but without copying the data if there is
insufficient space). The return value is propagated to the caller of
avcodec_encode_video where it would be possible to grow the buffer and
try again.
I've attached patches for both approaches.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encode_nals.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101231/91cb4e4c/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encode_nals-alternative.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101231/91cb4e4c/attachment.txt>
More information about the ffmpeg-devel
mailing list