[MPlayer-cvslog] r31110 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Sat May 1 15:50:50 CEST 2010


Author: reimar
Date: Sat May  1 15:50:49 2010
New Revision: 31110

Log:
Use av_probe_input_format2 and avoid accepting detection
while the score is still low.

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Fri Apr 30 23:18:17 2010	(r31109)
+++ trunk/libmpdemux/demux_lavf.c	Sat May  1 15:50:49 2010	(r31110)
@@ -135,6 +135,7 @@ static int lavf_check_file(demuxer_t *de
     lavf_priv_t *priv;
     int probe_data_size = 0;
     int read_size = INITIAL_PROBE_SIZE;
+    int score;
 
     if(!demuxer->priv)
         demuxer->priv=calloc(sizeof(lavf_priv_t),1);
@@ -170,11 +171,13 @@ static int lavf_check_file(demuxer_t *de
             avpd.filename += 9;
         avpd.buf_size= probe_data_size;
 
-        priv->avif= av_probe_input_format(&avpd, probe_data_size > 0);
+        score = 0;
+        priv->avif= av_probe_input_format2(&avpd, probe_data_size > 0, &score);
         read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size);
     } while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED ||
               probe_data_size < SMALL_MAX_PROBE_SIZE) &&
-             !priv->avif && read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
+             score < AVPROBE_SCORE_MAX / 4 &&
+             read_size > 0 && probe_data_size < PROBE_BUF_SIZE);
     av_free(avpd.buf);
 
     if(!priv->avif){


More information about the MPlayer-cvslog mailing list