avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 5 Jan 2015 15:21:42 +0000 (16:21 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 5 Jan 2015 16:40:09 +0000 (17:40 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/dvbsub.c

index 73d9c3e..fc17ccf 100644 (file)
@@ -33,6 +33,7 @@ static int dvbsub_probe(AVProbeData *p)
     int max_score = 0;
 
     for(i=0; i<p->buf_size; i++){
+        if (p->buf[i] == 0x0f) {
         const uint8_t *ptr = p->buf + i;
         uint8_t histogram[6] = {0};
         int min = 255;
@@ -55,6 +56,7 @@ static int dvbsub_probe(AVProbeData *p)
         }
         if (min && j > max_score)
             max_score = j;
+        }
     }
 
     if (max_score > 5)