[FFmpeg-devel] [PATCH 1/2] avfilter: change ff_inlink_make_frame_writable() to take AVFrame* argument

Nicolas George george at nsup.org
Sat Jan 28 19:35:01 EET 2017


Le nonidi 9 pluviôse, an CCXXV, Muhammad Faiz a écrit :
> So, if ff_inlink_make_frame_writable() takes AVFrame**, it will be
> incompatible with framequeue framework, because it stores AVFrame*, so
> it will contain dangling AVFrame*.

There is nothing "incompatible" about it, what would it even mean? It
just can not be used as is on this specific call site; it was not meant
to. It is a smaller, more versatile brick. You just need to add the
little bit of mortar to have it fit here.

It is not possible to "make" a frame writable, the original name is a
misnomer; the only thing possible is to create a new copy that is
uniquely referenced and therefore writable. If that is needed, an extra
copy can be made to have the new frame take the place of the old one.
But that is only rarely needed; making that copy always like you propose
following wm4's bad advice will just make the code less efficient and
more awkward.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170128/fa212a81/attachment.sig>


More information about the ffmpeg-devel mailing list