From ef17a0c7ba005fafd05e7d9f0ff294a59265a2dc Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 7 Aug 2014 09:12:34 +0200 Subject: 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. --- libavformat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/utils.c') 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; } /************************************************************/ -- cgit v1.2.3