[Libav-user] AVStream->codec deprecation

Perette Barella perette at barella.org
Mon Aug 22 01:00:22 EEST 2016

In the structure AVStream, member ‘AVCodecContext *codec’ is marked deprecated, and my use of it is causes compile warnings.

avformat_new_stream documentation
	https://ffmpeg.org/doxygen/3.1/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827 <https://ffmpeg.org/doxygen/3.1/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827>
indicates I’m to "call avcodec_close() and avformat_free_context() to clean up the allocation by avformat_new_stream()”.

avcodec_close requires an AVCodecContext, which is in the deprecated “codec”.

So what’s the deal?  Is there a new way I’m supposed to access this member?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160821/d11a8474/attachment.html>

More information about the Libav-user mailing list