Anton Khirnov (12020-07-01): > You do not dereference buf->opaque. You pass it to the free callback > when the refcount reaches zero, that is the only way it should ever be > used.
You are talking about the implementation of the refcounted structure. I was talking about when we use the refcounted structure. Your version makes every single use more complex, because of the indirection. This is something to know about code I write with new APIs: I always make efforts to make the API as simple to use as possible, even if it means making the implementation more complex. Because the implementation is done only once, but using the API will happen many times. And this is exactly what happens with your proposal: a refcounted structure defined with it would be more annoying to use because of the indirection, and I will not have it. If you have a proposal that makes using the refcounted structure as simple and clean as: av_foobar_ref(AVFoobar *f); av_foobar_unrefp(AVFoobar **f); then I will listen. But if you have type pruning or indirection, then my proposal is superior. Regards, -- Nicolas George
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".