Browse Source

avformat/srtdec: make sure we probe a number

Fixes regression since 7218352e0228028dfa009a3799ec93fd041065f1: WebVTT
files were matching the SRT probing.
tags/n3.0
Clément Bœsch 10 years ago
parent
commit
40d9d6de90
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/srtdec.c

+ 1
- 1
libavformat/srtdec.c View File

@@ -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…
Cancel
Save