]> git.sesse.net Git - ffmpeg/commitdiff
Make h261 and mpegvideo probe a little more robust so they dont fail with
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Sep 2009 13:27:13 +0000 (13:27 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Sep 2009 13:27:13 +0000 (13:27 +0000)
slightly different probetest.

Originally committed as revision 19856 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/raw.c

index 3a53eee527015f95e3f542c645b18ff9bd81f655..f807a96f31f09498b5f4f933d8ad3a56ebbb5676 100644 (file)
@@ -326,7 +326,7 @@ static int mpegvideo_probe(AVProbeData *p)
         }
     }
     if(seq && seq*9<=pic*10 && pic*9<=slice*10 && !pspack && !pes)
-        return AVPROBE_SCORE_MAX/2+1; // +1 for .mpg
+        return pic>1 ? AVPROBE_SCORE_MAX/2+1 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
     return 0;
 }
 #endif
@@ -515,7 +515,7 @@ static int h261_probe(AVProbeData *p)
             }
         }
     }
-    if(valid_psc > 2*invalid_psc + 4){
+    if(valid_psc > 2*invalid_psc + 6){
         return 50;
     }else if(valid_psc > 2*invalid_psc + 2)
         return 25;