[FFmpeg-devel] [PATCH 1/2] avcodec/decode: make ff_frame_new_side_data_from_buf behave like the function it's a wrapper for
James Almer
jamrial at gmail.com
Fri Feb 7 18:22:33 EET 2025
On 2/7/2025 9:17 AM, Andreas Rheinhardt wrote:
> James Almer:
>> It's less confusing to have ff_frame_new_side_data_from_buf() be a drop in
>> replacement for av_frame_side_data_add(), and the addition of the missing flags
>> field will make it more versatile, as will be seen in the following commit.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> libavcodec/av1dec.c | 6 ++++--
>> libavcodec/decode.c | 13 +++++--------
>> libavcodec/decode.h | 11 +++++++----
>> libavcodec/h2645_sei.c | 12 ++++++++----
>> libavcodec/hevc/hevcdec.c | 7 +++++--
>> libavcodec/hevc/refs.c | 6 ++++--
>> libavcodec/libdav1d.c | 6 ++++--
>> libavcodec/libjxldec.c | 6 ++++--
>> libavcodec/mpeg12dec.c | 6 ++++--
>> 9 files changed, 45 insertions(+), 28 deletions(-)
[...]
>
> This adds these cleanup av_buffer_unref() everywhere. That is not an
> improvement.
It makes the function have the same semantics as
av_frame_side_data_add(), including the addition of the flags argument,
so it can be a direct drop in replacement in lavc.
This does result in a potential extra cleaning step for callers, but
it's hardly a problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250207/73ec785a/attachment.sig>
More information about the ffmpeg-devel
mailing list