Commit 5bbd93c3 authored by Samuel Foss's avatar Samuel Foss Committed by Michael Niedermayer

avformat/utils: Find a fallback probe decoder that will also match a forced decoder's codec.

Prevent codecpar->codec_id from getting out of sync with the codec instantiated for probing.
Signed-off-by: 's avatarSamuel Foss <sfoss@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 470bbf60
......@@ -219,7 +219,7 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
const AVCodec *probe_codec = NULL;
void *iter = NULL;
while ((probe_codec = av_codec_iterate(&iter))) {
if (probe_codec->id == codec_id &&
if (probe_codec->id == codec->id &&
av_codec_is_decoder(probe_codec) &&
!(probe_codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_EXPERIMENTAL))) {
return probe_codec;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment