On Thu, Sep 04, 2014 at 10:40:26PM +0200, wm4 wrote: > --- > As suggested by ubitux. Note that the change to ff_subtitles_read_line() > already cuts down the probing time a lot, so maybe this is not needed. > --- > 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);
Pushed. -- Clément B.
pgpZNjJWwH7KL.pgp
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel