diff options
author | Clément Bœsch <clement@stupeflix.com> | 2015-10-09 10:52:58 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-10-09 21:55:47 +0200 |
commit | f2c07de0a5a7ea1c48fc872f1057974cf0df3ca7 (patch) | |
tree | 178b11fcb3de1e5ab1d05ab05ca71d9a332286af | |
parent | 2e575c1e8dd7ab5e050caf431693fbf8b69f2c7f (diff) | |
download | ffmpeg-f2c07de0a5a7ea1c48fc872f1057974cf0df3ca7.tar.gz |
avformat/srtdec: make sure we probe a number
Fixes regression since 7218352e0228028dfa009a3799ec93fd041065f1: WebVTT
files were matching the SRT probing.
(cherry picked from commit 40d9d6de90c3652f4c468ab14976c7faf5e40c07)
-rw-r--r-- | libavformat/srtdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c index 7fee0fc2d1..3b1373f559 100644 --- a/libavformat/srtdec.c +++ b/libavformat/srtdec.c @@ -45,7 +45,7 @@ static int srt_probe(AVProbeData *p) * Also, that number can be followed by random garbage, so we can not * unfortunately check that we only have a number. */ if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0 || - strtol(buf, &pbuf, 10) < 0) + strtol(buf, &pbuf, 10) < 0 || pbuf == buf) return 0; /* Check if the next line matches a SRT timestamp */ |