[FFmpeg-cvslog] avformat/srtdec: fix number check for the first character

Clément Bœsch git at videolan.org
Thu Oct 1 11:50:21 CEST 2015


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Thu Oct  1 11:46:05 2015 +0200| [d161a2a72b083c51ec8fad33a29283703f5fd0cc] | committer: Clément Bœsch

avformat/srtdec: fix number check for the first character

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d161a2a72b083c51ec8fad33a29283703f5fd0cc
---

 libavformat/srtdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 60d2f48..ac0fb55 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;
 



More information about the ffmpeg-cvslog mailing list