Do not detect a format if another has the same score.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2008 13:50:02 +0000 (13:50 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2008 13:50:02 +0000 (13:50 +0000)
Originally committed as revision 12837 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index dad2104..55b9fba 100644 (file)
@@ -282,7 +282,8 @@ static AVInputFormat *av_probe_input_format2(AVProbeData *pd, int is_opened, int
         if (score > *score_max) {
             *score_max = score;
             fmt = fmt1;
-        }
+        }else if (score == *score_max)
+            fmt = NULL;
     }
     return fmt;
 }