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

Raphaël Zumer raphael.zumer at vimeo.com
Tue Mar 14 01:19:20 EET 2023


On 3/13/23 18:35, Andreas Rheinhardt wrote:
> size being mandatory is different from similar APIs. There is even a
> usecase without size: If you simply feed this to something that expects
> the data to be serialized and trust the data to be complete, you don't
> need the size.
OK, I'll amend that.
> You are allocating without any padding. This implies that one could not
> use this buffer with our GetBit-API or in other places where one needed
> a padded buffer.

Is there any comparable code that does that? I feel like padding a buffer should be the responsibility of the caller for a public function, otherwise the user has to be aware of the padding to avoid embedding extra payload bytes accidentally (even though it is negligible in size), it is an extra manipulation if padding is not needed, and requires including an extra file to access the padding size.

RZ



More information about the ffmpeg-devel mailing list