lavf: allow using request_probe as a score threshold to accept a codec
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 22 Sep 2012 23:06:07 +0000 (01:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 22 Sep 2012 23:22:16 +0000 (01:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 9c607d7..0a79fe7 100644 (file)
@@ -415,7 +415,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeDa
     int score;
     AVInputFormat *fmt = av_probe_input_format3(pd, 1, &score);
 
-    if (fmt) {
+    if (fmt && st->request_probe <= score) {
         int i;
         av_log(s, AV_LOG_DEBUG, "Probe with size=%d, packets=%d detected %s with score=%d\n",
                pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score);