summaryrefslogtreecommitdiff
path: root/libavformat/concatdec.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-02-03 10:22:57 +0100
committerNicolas George <nicolas.george@normalesup.org>2013-02-13 14:58:50 +0100
commitdb9dc5154d1a586aa95362e7ed4334df321e5a72 (patch)
tree47735040694b72c798da2a4e042351fa8498e085 /libavformat/concatdec.c
parent6d680d20ad8bf786f541bec1545bec7778b8776c (diff)
lavf/concatdec: add signature directive.
Diffstat (limited to 'libavformat/concatdec.c')
-rw-r--r--libavformat/concatdec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index bba99d8e66..b99ec5c15c 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -173,6 +173,15 @@ static int concat_read_header(AVFormatContext *avf)
}
if ((ret = add_file(avf, filename, &file, &nb_files_alloc)) < 0)
FAIL(ret);
+ } else if (!strcmp(keyword, "ffconcat")) {
+ char *ver_kw = get_keyword(&cursor);
+ char *ver_val = get_keyword(&cursor);
+ if (strcmp(ver_kw, "version") || strcmp(ver_val, "1.0")) {
+ av_log(avf, AV_LOG_ERROR, "Line %d: invalid version\n", line);
+ FAIL(AVERROR_INVALIDDATA);
+ }
+ if (cat->safe < 0)
+ cat->safe = 1;
} else {
av_log(avf, AV_LOG_ERROR, "Line %d: unknown keyword '%s'\n",
line, keyword);