[FFmpeg-devel] [PATCH 2/2] avutil: add HDR10+ dynamic metadata serialization function

Anton Khirnov anton at khirnov.net
Mon Mar 13 15:36:56 EET 2023


Quoting Raphaël Zumer (2023-03-12 22:50:27)
> I expanded on this in another email in the chain, but the buffer size needs to be communicated to the user, as it is not embedded in the payload. It seems needlessly convoluted to me to create a separate function solely to calculate the size of the buffer so that it can be allocated by the user and passed to the serialization function, and I cannot think of another solution that would not be even more convoluted and awkward for the user.
> 
> I don't understand how going from AVBufferRef to uint8_t* is more complicated than the reverse. The buffer in the AVBufferRef is allocated via av_malloc() and is directly accessible through the data field. Am I missing some detail?

What I mean is that once data is wrapped in an AVBufer, it is "locked
in", you always have to keep an AVBufferRef around.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list