Skip to content
Snippets Groups Projects
Commit 40d9d6de authored by Clément Bœsch's avatar Clément Bœsch
Browse files

avformat/srtdec: make sure we probe a number

Fixes regression since 7218352e: WebVTT
files were matching the SRT probing.
parent 4f7d9b77
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ static int srt_probe(AVProbeData *p) ...@@ -45,7 +45,7 @@ static int srt_probe(AVProbeData *p)
* Also, that number can be followed by random garbage, so we can not * Also, that number can be followed by random garbage, so we can not
* unfortunately check that we only have a number. */ * unfortunately check that we only have a number. */
if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0 || if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0 ||
strtol(buf, &pbuf, 10) < 0) strtol(buf, &pbuf, 10) < 0 || pbuf == buf)
return 0; return 0;
/* Check if the next line matches a SRT timestamp */ /* Check if the next line matches a SRT timestamp */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment