|
|
@ -2655,13 +2655,15 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt, |
|
|
|
if (!frame) |
|
|
|
if (!frame) |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
return AVERROR(ENOMEM); |
|
|
|
|
|
|
|
|
|
|
|
if (!avcodec_is_open(st->codec) && !st->info->found_decoder) { |
|
|
|
if (!avcodec_is_open(st->codec) && |
|
|
|
|
|
|
|
st->info->found_decoder <= 0 && |
|
|
|
|
|
|
|
(st->codec->codec_id != -st->info->found_decoder || !st->codec->codec_id)) { |
|
|
|
AVDictionary *thread_opt = NULL; |
|
|
|
AVDictionary *thread_opt = NULL; |
|
|
|
|
|
|
|
|
|
|
|
codec = find_decoder(s, st, st->codec->codec_id); |
|
|
|
codec = find_decoder(s, st, st->codec->codec_id); |
|
|
|
|
|
|
|
|
|
|
|
if (!codec) { |
|
|
|
if (!codec) { |
|
|
|
st->info->found_decoder = -1; |
|
|
|
st->info->found_decoder = -st->codec->codec_id; |
|
|
|
ret = -1; |
|
|
|
ret = -1; |
|
|
|
goto fail; |
|
|
|
goto fail; |
|
|
|
} |
|
|
|
} |
|
|
@ -2673,7 +2675,7 @@ static int try_decode_frame(AVFormatContext *s, AVStream *st, AVPacket *avpkt, |
|
|
|
if (!options) |
|
|
|
if (!options) |
|
|
|
av_dict_free(&thread_opt); |
|
|
|
av_dict_free(&thread_opt); |
|
|
|
if (ret < 0) { |
|
|
|
if (ret < 0) { |
|
|
|
st->info->found_decoder = -1; |
|
|
|
st->info->found_decoder = -st->codec->codec_id; |
|
|
|
goto fail; |
|
|
|
goto fail; |
|
|
|
} |
|
|
|
} |
|
|
|
st->info->found_decoder = 1; |
|
|
|
st->info->found_decoder = 1; |
|
|
|