[FFmpeg-devel] [PATCH] libavcodec/options.c: handle hw_frames_ctx where necessary

Andrey Turkin andrey.turkin at gmail.com
Fri May 13 16:24:51 CEST 2016

> No: this part of the patch does nothing because it's already unreffed in
> avcodec_close() called immediately above.  Maybe the unref should
actually be in
> avcodec_free_context() only (if treating it like rc_override and those
> but it shouldn't be in both.
I missed that, thank you for pointing it out; so there is no memory leak
then. Whether it should be unrefed on codec close is a matter of opinion;
in my opinion avcodec_close shouldn't touch things that aren't created by
However I'm inclined to remove that portion of a patch and let someone else
decide if this behaviour should be changed.

More information about the ffmpeg-devel mailing list