[FFmpeg-devel] [PATCH] frame: add an av_frame_new_side_data_from_buf function
george at nsup.org
Thu Mar 1 16:13:56 EET 2018
James Almer (2018-03-01):
> I prefer if the function takes ownership of the reference rather than
> create a new one on success.
> If it creates a new one, then the caller still needs to do something
> with the reference passed to the function afterwards regardless of
> outcome, as shown in your changes to av_frame_new_side_data().
> This is also extra overhead and one more point of failure for the
> function (creating the reference) for no real gain. Let the user decide
> if they want to keep the reference they passed or if they have no use
> for it and would rather have the side data take ownership of it.
I second all these arguments. Making an extra reference can always be
done by the caller. Avoiding the extra reference would not be possible.
It would have been nice to think of a consistent naming scheme for that,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: Digital signature
More information about the ffmpeg-devel