summaryrefslogtreecommitdiff
path: root/libavformat/srtdec.c
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-10-01 11:46:05 +0200
committerClément Bœsch <clement@stupeflix.com>2015-10-01 11:46:05 +0200
commitd161a2a72b083c51ec8fad33a29283703f5fd0cc (patch)
treee16ec333489362e7d8e75d90b137dbbce3eb765b /libavformat/srtdec.c
parent9e9d731b510666edac3a2b450dfc331279db818b (diff)
downloadffmpeg-d161a2a72b083c51ec8fad33a29283703f5fd0cc.tar.gz
avformat/srtdec: fix number check for the first character
Diffstat (limited to 'libavformat/srtdec.c')
-rw-r--r--libavformat/srtdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 60d2f48517..ac0fb55771 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -49,7 +49,7 @@ static int srt_probe(AVProbeData *p)
/* Check if the next line matches a SRT timestamp */
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
return 0;
- if (buf[0] >= '0' && buf[1] <= '9' && strstr(buf, " --> ")
+ if (buf[0] >= '0' && buf[0] <= '9' && strstr(buf, " --> ")
&& sscanf(buf, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
return AVPROBE_SCORE_MAX;