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