<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">In the structure AVStream, member ‘AVCodecContext *codec’ is marked deprecated, and my use of it is causes compile warnings.<div class=""><br class=""></div><div class="">avformat_new_stream documentation</div><div class=""><span class="Apple-tab-span" style="white-space:pre">       </span><a href="https://ffmpeg.org/doxygen/3.1/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827" class="">https://ffmpeg.org/doxygen/3.1/group__lavf__core.html#gadcb0fd3e507d9b58fe78f61f8ad39827</a></div><div class="">indicates I’m to "call avcodec_close() and avformat_free_context() to clean up the allocation by avformat_new_stream()”.</div><div class=""><br class=""></div><div class="">avcodec_close requires an AVCodecContext, which is in the deprecated “codec”.</div><div class=""><br class=""></div><div class="">So what’s the deal?  Is there a new way I’m supposed to access this member?</div><div class=""><br class=""></div><div class="">Perette</div><div class=""><br class=""></div></body></html>