<div dir="ltr"><div><div><div>    Hello.</div><div>    I'm using FFmpeg-built-in MediaCodec decoder to decode h264 stream like this:<br><br>```<br>    AVCodec *codec = avcodec_find_decoder_by_name("h264_mediacodec");<br>    AVCodecContext *context = avcodec_alloc_context3(codec);<br>    int ret = avcodec_open2(context, codec, NULL);<br>    if(ret < 0)<br>    {<br>        __android_log_print(ANDROID_LOG_ERROR, "ffmpeg", "fail open codec.[%d]", ret);<br>    }<br>```<br><br></div>    I get the error message. But if I write this way:<br><br>```<br>    AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_H264);<br>    AVCodecContext *context = avcodec_alloc_context3(codec);<br>    int ret = avcodec_open2(context, codec, NULL);<br>    if(ret < 0)<br>    {<br>        __android_log_print(ANDROID_LOG_ERROR, "ffmpeg", "fail open codec.[%d]", ret);<br>    }<br>```<br><br></div>    Program runs quite fine. I guess it's about some factors in AVCodecContext. If so, could you inform me of what these factors are?<br><br></div>    Best wishes!<br></div>