[FFmpeg-devel] [PATCH] Respect payload offset in av_grow_packet

Andriy Lysnevych andriy.lysnevych at gmail.com
Wed May 25 16:58:33 CEST 2016


> data_offset should probably be size_t, thats also what offsetof() would
> give
> a pointer difference can be larger than INT_MAX

Done

> also please add a av_assert0 that pkt->data is not NULL or handle that
> case

Done NULL data handling but it makes code more complex. Please check.

> as pkt->size can be 0 iam not sure pkt->data is guranteed to be non
> null

It should work with pkt->size = 0 for both reference counted and
not-reference counted packets without memory leak. It should allocate
just padding and zeroize it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Respect-payload-offset-in-av_grow_packet.patch
Type: text/x-patch
Size: 2119 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160525/56ec1c51/attachment.bin>


More information about the ffmpeg-devel mailing list