aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-10-01 11:46:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-08 15:21:24 +0200
commit1d9d300d6514de851504255e4eb1e52117c6992f (patch)
tree4e7d275ec07882478e1390a0b8f5fb36606f25dd
parenta931ad554d0d7a337f3ac3340622f189556885fc (diff)
downloadffmpeg-1d9d300d6514de851504255e4eb1e52117c6992f.tar.gz
avformat/srtdec: fix number check for the first character
(cherry picked from commit d161a2a72b083c51ec8fad33a29283703f5fd0cc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/srtdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index b35e50fc36..fda055b176 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;