[FFmpeg-devel] [PATCH 04/11] avutil/frame: av_frame_side_data_new_struct()

James Almer jamrial at gmail.com
Thu Mar 6 17:39:49 EET 2025


On 3/6/2025 11:50 AM, Andreas Rheinhardt wrote:
> Can't you add a new parameter nb_elems to also handle all the side data
> that only has a single array? This would then also cover
> AV_FRAME_DATA_REGIONS_OF_INTEREST, AV_FRAME_DATA_VIDEO_ENC_PARAMS,
> AV_FRAME_DATA_DETECTION_BBOXES, AV_FRAME_DATA_VIDEO_HINT.
> AV_FRAME_DATA_A53_CC, AV_FRAME_DATA_ICC_PROFILE,
> AV_FRAME_DATA_SEI_UNREGISTERED, AV_FRAME_DATA_DOVI_RPU_BUFFER and
> AV_FRAME_DATA_LCEVC.

I considered it, but then i noticed that VIDEO_ENC_PARAMS also has a 
type argument on its allocator, which even if can be worked around by 
setting the field in question manually after a 
av_frame_side_data_new_struct() call, in some more complex types in the 
future such an extra argument could affect what's allocated.

It's the reason i didn't ping or push this part of the set.

> 
> If you want to, I can write the patch for this.

If you can come up with an idea to work around the above (maybe 
type-specific structs with init params?), or consider the scenario is 
not worth the extra complexity and just ignore it, then sure.

-------------- 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/20250306/63c44d81/attachment.sig>


More information about the ffmpeg-devel mailing list