mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/srtdec: make sure we probe a number
Fixes regression since7218352e02
: WebVTT files were matching the SRT probing. (cherry picked from commit40d9d6de90
)
This commit is contained in:
parent
5ac6daf995
commit
6b6932471e
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user