[FFmpeg-cvslog] avformat/srtdec: speed up probing
wm4
git at videolan.org
Fri Sep 5 23:21:35 CEST 2014
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Thu Sep 4 21:16:13 2014 +0200| [c368538667121fb20c5414dfaf0fb273035a0854] | committer: Clément Bœsch
avformat/srtdec: speed up probing
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c368538667121fb20c5414dfaf0fb273035a0854
---
libavformat/srtdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index b63d344..f5f3933 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -43,6 +43,7 @@ static int srt_probe(AVProbeData *p)
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
break;
if ((num == i || num + 1 == i)
+ && buf[0] >= '0' && buf[1] <= '9' && strstr(buf, " --> ")
&& sscanf(buf, "%*d:%*2d:%*2d%*1[,.]%*3d --> %*d:%*2d:%*2d%*1[,.]%3d", &v) == 1)
return AVPROBE_SCORE_MAX;
num = atoi(buf);
More information about the ffmpeg-cvslog
mailing list