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

James Almer jamrial at gmail.com
Wed Sep 4 16:29:00 EEST 2019


On 9/3/2019 10:47 AM, James Almer wrote:
> 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.

Pushed.


More information about the ffmpeg-devel mailing list