[FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

Nicolas George george at nsup.org
Tue Mar 23 21:07:14 EET 2021


James Almer (12021-03-23):
> I really don't like the idea of returning a pointer to some offset within an
> internal struct that may either start pointing at some other entry or even
> to freed memory, especially when the alternative of giving the user a copy
> of a single entry is trivial to do and actually safe.

It is already what the users who accessed the field directly did.

And I am pretty sure I can find examples where we do similar things in
the code base.

And it is exactly what we are doing when we let users access fields
directly.

And the problem of sizeof(AVIndexEntry) part of the ABI just disappears
if we do that.

May I suggest that you recalibrate your dislike?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210323/0acb75c9/attachment.sig>


More information about the ffmpeg-devel mailing list