[FFmpeg-devel] [PATCH] avcodec/decode: add a flags parameter to ff_reget_buffer()

James Almer jamrial at gmail.com
Tue Sep 3 16:47:34 EEST 2019


On 8/31/2019 12:22 PM, James Almer wrote:
> Some decoders may not need a writable buffer in some specific cases, but only
> a reference to the existing buffer with updated frame properties instead, for
> the purpose of returning duplicate frames. For this, the
> FF_REGET_BUFFER_FLAG_READONLY flag is added, which will prevent potential
> allocations and buffer copies when they are not needed.
> 
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> Decided to keep the default behavior untouched (meaning a writable buffer is
> returned), and turned the new parameter into a flags one.
> It's cleaner overall, as almost every ff_reget_buffer calls will use a 0 as
> argument for it.

Will push this soon.


More information about the ffmpeg-devel mailing list