<div dir="ltr">Hi. I am trying to get rid of deprecation warning in the API. I am running with<div>ffmpeg -20170711 version. I have a code where I don't explicitly create AVCodecContext</div><div>because I multiplex already existing h264 NALS. But I still have to setup AVStream which has AVCodecContext which it creates internally based on the codec I pass into </div><div><br></div><div>avformat_new_stream<br></div><div><br></div><div>.So I have something like this then:</div><div><br></div><div><div><span style="white-space:pre">   </span>mVideoOutStream->codec->gop_size = muxerParams.gopSize;</div><div><span style="white-space:pre">         </span> <span style="white-space:pre">    </span>mVideoOutStream->codec->time_base.den = mVideoOutStream->time_base.den;</div><div><span style="white-space:pre">              </span> <span style="white-space:pre">    </span>mVideoOutStream->codec->time_base.num = mVideoOutStream->time_base.num;</div><div><br></div><div><span style="white-space:pre">                     </span>EYE_ASSERT(mVideoOutStream);</div><div><br></div><div><span style="white-space:pre">                 </span>if (mOutputFormatContext->oformat->flags & AVFMT_GLOBALHEADER)</div><div><span style="white-space:pre">                      </span>{</div><div><span style="white-space:pre">                     </span> <span style="white-space:pre">    </span>mVideoOutStream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; </div><div><span style="white-space:pre">                 </span>}</div></div><div><br></div><div>Every place I access '->codec->' the compiler says it's deprecated,and the FFMPEG says </div><div>I have to use codecpar instead.But codecpar doesn't have those params. What do I do in this case? Create explicitly codec context and assign it to the stream? Looks like newer API has some design gaps.</div><div>Thanks.</div><div><br></div><div><br></div><div><br></div></div>