[FFmpeg-cvslog] Do not return a probe score from set_codec_from_probe_data() if the codec was ignored.

Carl Eugen Hoyos git at videolan.org
Thu Aug 7 12:31:56 CEST 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Thu Aug  7 09:12:34 2014 +0200| [ef17a0c7ba005fafd05e7d9f0ff294a59265a2dc] | committer: Carl Eugen Hoyos

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef17a0c7ba005fafd05e7d9f0ff294a59265a2dc
---

 libavformat/utils.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6ebbe6c..d4f369b 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;
 }
 
 /************************************************************/



More information about the ffmpeg-cvslog mailing list