[FFmpeg-devel] [PATCH] avutil/frame: Add avcodec_private_ref to AVFrame

Timo Rothenpieler timo at rothenpieler.org
Mon Nov 6 14:23:01 EET 2017


>> I would prefer if this field would not be library-specific, but
>> perhaps just "private_ref" which is not allowed to be touched by
>> users, and documented to only be valid while within one library - ie.
>> if you pass a frame from avcodec to avfilter, avfilter could take over
>> the field (and just free any info, if its still in there).
>> This would avoid any chances of adding a multitude of fields later,
>> and a single AVFrame instance is not going to be used in multiple
>> libraries at the same time anyway (the contents might, but not the
>> actual AVFrame struct)
> 
> that should be easy to implement ...
> 
> a disadvantage is the slightly higher chance of mixing up types if
> some codepath doesnt cleanup the field
> 
> question is what do most prefer ?
> avcodec_private_ref ?           (that is one for each of the 2 libs)
> private_ref ?
> avframe_internal_ref ?          (that is a private struct defined in avutil similar to AVCodecInternal)

I like private_ref.

Following this approach also keeps the diff to libav small.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171106/22b00394/attachment.bin>


More information about the ffmpeg-devel mailing list