<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">Is it possible to set a specific AVInputFormat when working with the AVCodec functions?</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">The way I'm trying to decode the video is:</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">*ppCodec = avcodec_find_decoder(AV_CODEC_ID_MXPEG);</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">*ppCodecContext = avcodec_alloc_context3(*ppCodec);</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">avcodec_open2(*ppCodecContext, *ppCodec, NULL)</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">and then decode using avcodec_decode_video2(...)</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">The decode succeeds only for the first frame. I think I need to set the AVInputFormat to "mxg" in order for this to work for the Mobotix MxPEG stream, but I'm not sure how.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(34,34,34);line-height:19.5px">The error message I'm getting is that <span style="font-size:13px;line-height:16.8999996185303px">got_picture_ptr</span><span style="font-size:13px;line-height:16.8999996185303px"> from </span><span style="font-size:13px;line-height:16.8999996185303px">avcodec_decode_video2</span><span style="font-size:13px;line-height:16.8999996185303px"> returns with 0 for all but the first frame.</span></p></div>