[FFmpeg-devel] [PATCH 4/6 v2] avutil/mastering_display_metadata: add a new allocator function that returns a size

Anton Khirnov anton at khirnov.net
Wed Mar 27 09:41:54 EET 2024


Quoting James Almer (2024-03-25 22:13:25)
> On 3/25/2024 6:02 PM, Andreas Rheinhardt wrote:
> > James Almer:
> >> I don't mind a function like that being added to simplify future
> >> additions, but this API is orthogonal to the frame side data one. It's
> >> also used in packets, for example, and right now lavf is using
> >> sizeof(AVMasteringDisplayMetadata) because
> >> av_mastering_display_metadata_alloc() is not useful.
> >>
> > 
> > The API proposed by me is supposed to make API like
> > av_mastering_display_metadata_alloc_size() redundant and therefore these
> > two additions are not orthogonal.
> 
> Just because there's a frame side data type for MDM does not make the 
> new alloc function redundant.

The commit message says:

> av_mastering_display_metadata_alloc() is not useful in scenarios where you need to
> know the runtime size of AVMasteringDisplayMetadata.

In what scenarios besides side data do you need to know the size of this
struct?

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list