Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-10-01 12:48:45 +0300
committerClément Bœsch <clement@stupeflix.com>2015-10-01 12:48:45 +0300
commit7218352e0228028dfa009a3799ec93fd041065f1 (patch)
tree346fe2925e1094e258d93dd33f7a409039b8de9e /libavformat/srtdec.c
parentd161a2a72b083c51ec8fad33a29283703f5fd0cc (diff)
avformat/srtdec: more lenient first line probing
Fixes Ticket #4898
Diffstat (limited to 'libavformat/srtdec.c')
-rw-r--r--libavformat/srtdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index ac0fb55771..e9cd6474b0 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -41,9 +41,11 @@ static int srt_probe(AVProbeData *p)
ff_text_r8(&tr);
/* Check if the first non-empty line is a number. We do not check what the
- * number is because in practice it can be anything. */
+ * number is because in practice it can be anything.
+ * 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 || *pbuf)
+ strtol(buf, &pbuf, 10) < 0)
return 0;
/* Check if the next line matches a SRT timestamp */