[FFmpeg-devel] [PATCH 3/3] avcodec/avpacket: Don't write into non-writable buffer

James Almer jamrial at gmail.com
Wed Feb 12 17:56:05 EET 2020


On 2/12/2020 12:44 PM, Andreas Rheinhardt wrote:
> On Wed, Feb 12, 2020 at 4:31 PM Andreas Rheinhardt <
> andreas.rheinhardt at gmail.com> wrote:
> 
>> But given that it
>> also zeroes the padding it also needs to make sure that the buffer is
>> actually writable; this commit implements this.
>>
> 
> av_shrink_packet has a similar issue and it seems unfixable given that it
> is used with non-refcounted packets and doesn't return anything.
> 
> - Andreas

A solution could be introducing an av_packet_realloc/resize() function
that in practice implements both grow's and shrink's functionality, so
we can then deprecate the latter two (Good reason to do that as well,
seeing they don't use the av_packet_* namespace).


More information about the ffmpeg-devel mailing list