Commit 3bf2b376 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0e1c827e
......@@ -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;
......@@ -56,6 +57,7 @@ static int dvbsub_probe(AVProbeData *p)
if (min && j > max_score)
max_score = j;
}
}
if (max_score > 5)
return AVPROBE_SCORE_EXTENSION/2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment