Re: [FFmpeg-devel] [PATCH] lavu/buffer: reuse AVBufferRef alloction

2020-11-18 Thread Anton Khirnov
Quoting Gil Pedersen (2020-11-18 12:24:09) > This is an optimization to av_buffer_replace() to avoid a redundant allocation > when the src and dst are non-NULL. > > Instead of doing a unref + ref, the dst buffer is reused and buffer counters > updated accordingly. > > Signed-off-by: Gil Pedersen

[FFmpeg-devel] [PATCH] lavu/buffer: reuse AVBufferRef alloction

2020-11-18 Thread Gil Pedersen
This is an optimization to av_buffer_replace() to avoid a redundant allocation when the src and dst are non-NULL. Instead of doing a unref + ref, the dst buffer is reused and buffer counters updated accordingly. Signed-off-by: Gil Pedersen --- libavutil/buffer.c | 26 +++---