summaryrefslogtreecommitdiff
path: root/libavformat/dvbsub.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-05 16:21:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-05 17:40:09 +0100
commit3bf2b376e64bef231c3f9e52aca60e3aded43e5d (patch)
tree883323aba2c2bfcca76fdce1ec1d727832aa4973 /libavformat/dvbsub.c
parent0e1c827e842c0a86eb32de853162d97e214e2b23 (diff)
downloadffmpeg-3bf2b376e64bef231c3f9e52aca60e3aded43e5d.tar.gz
avformat/dvbsub: check for 0xf0 earlier in probe, 30% faster
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/dvbsub.c')
-rw-r--r--libavformat/dvbsub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/dvbsub.c b/libavformat/dvbsub.c
index 73d9c3ef91..fc17ccf2a6 100644
--- a/libavformat/dvbsub.c
+++ b/libavformat/dvbsub.c
@@ -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)