diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-08-07 09:12:34 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-08-07 09:12:34 +0200 |
commit | ef17a0c7ba005fafd05e7d9f0ff294a59265a2dc (patch) | |
tree | 15a4240a405b9457ee62f5ca6d61f695da2f2c6a /libavformat/utils.c | |
parent | 5b12b4fc4b2217a5ea69c4ca6dbb5debeb39bb2b (diff) | |
download | ffmpeg-ef17a0c7ba005fafd05e7d9f0ff294a59265a2dc.tar.gz |
Do not return a probe score from set_codec_from_probe_data() if the codec was ignored.
This is a workaround for the issue that stream probing can use
the score of another codec type for mpeg stream autodetection.
Fixes ticket #3821.
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 6ebbe6cbd9..d4f369bfa7 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -278,11 +278,11 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, if (!strcmp(fmt->name, fmt_id_type[i].name)) { st->codec->codec_id = fmt_id_type[i].id; st->codec->codec_type = fmt_id_type[i].type; - break; + return score; } } } - return score; + return 0; } /************************************************************/ |