<div dir="ltr">Thank for your answer.<div><br></div><div style>Actually the problem was that I allocate and initialize a new AVCodecContext, like that:</div><div style><i>avCodecContext = avcodec_alloc_context3( avCodec);</i></div><div style><i>avcodec_get_context_defaults3( avCodecContext, avCodec );</i></div><div style><i>// set some values: width, height, pixel format...</i></div><div style><br></div><div style>Instead of get it from the AVFormatContext:</div><div style><i>AVCodecContext* context = avFormatContext.streams[0]->codec;</i><br></div><div style><br></div><div style>When I check the fileds of this new object in debug, it has some fileds initialized to differents values. And the decoding works!</div><div style><br></div></div>