James Almer (12021-12-14):
> You could attach it dynamically allocated strings too, and to prevent the
> need for the module allocating them to outlive the layout, we could add an
> opaque pointer to AVChannelLayout (not AVChannelCustom) and a user set
> free() call back to pass that pointer to, on uninit().

So you want to shift the responsibility to worry about pointer lifetime
and ownership to the API user. Sure, we can do that. We can always shift
responsibility to API users, but that is not very nice to them.

I think the best solution would be to make this new structure
ref-counted.

Remember that I proposed a template to make ref-counted structures
easily:
https://ffmpeg.org/pipermail/ffmpeg-devel/2020-June/265227.html
(Notice that it was soon after the first version of this API was posted:
I was thinking of it already then.)

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to