[FFmpeg-devel] [PATCH 26/39] avcodec/dvenc: Avoid copying packet data, allow user-supplied buffers

James Almer jamrial at gmail.com
Fri May 21 16:06:13 EEST 2021


On 5/21/2021 6:17 AM, Andreas Rheinhardt wrote:
> When the packet size is known in advance like here, one can avoid
> an intermediate buffer for the packet data; this also makes it easy
> to allow user-supplied buffers. Only one thing needed to be changed:
> The earlier code relied on the buffer having been initially zeroed
> by av_fast_padded_malloc(), so one now needs to zero the packet at
> first.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>   libavcodec/dvenc.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)

Patches 1 to 26 LGTM (After addressing the comments i made in two of them).


More information about the ffmpeg-devel mailing list