summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Foss <sfoss@google.com>2020-06-03 07:15:28 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2020-06-04 19:22:29 +0200
commit5bbd93c3ee912af6f46d592b1fe6653894dd1f75 (patch)
treed5ee245d0d856a39bfff4dd8504e812c83ff7b95
parent470bbf60d4cd34abd2cabea40910af6c0fc2366c (diff)
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: Samuel Foss <sfoss@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c9385318f6..b3d902c6b5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;