[FFmpeg-cvslog] lavf/concatdec: add signature directive.
Nicolas George
git at videolan.org
Wed Feb 13 15:04:23 CET 2013
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sun Feb 3 10:22:57 2013 +0100| [db9dc5154d1a586aa95362e7ed4334df321e5a72] | committer: Nicolas George
lavf/concatdec: add signature directive.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db9dc5154d1a586aa95362e7ed4334df321e5a72
---
doc/demuxers.texi | 4 ++++
libavformat/concatdec.c | 9 +++++++++
2 files changed, 13 insertions(+)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 2a6f779..2867538 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -58,6 +58,10 @@ following directive is recognized:
Path to a file to read; special characters and spaces must be escaped with
backslash or single quotes.
+ at item @code{ffconcat version 1.0}
+Identify the script type and version. It also sets the @option{safe} option
+to 1 if it was to its default -1.
+
@end table
@subsection Options
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index bba99d8..b99ec5c 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);
More information about the ffmpeg-cvslog
mailing list