summaryrefslogtreecommitdiff
path: root/libavformat/concatdec.c
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2021-07-28 12:38:08 +0200
committerNicolas George <george@nsup.org>2021-08-22 11:44:16 +0200
commit46fb395952be32692385449ee214461603480b4b (patch)
tree64b5d6911f90bc423628767884a793f5af2bce3f /libavformat/concatdec.c
parent5b258c27702c3a58b9be2b23b074ad4c4355bdac (diff)
libavformat/concatdec: remove support for unsafe=-1
It only makes sense as the default value, but it is not the default since 689211d5727231c3fe92762d224dbadebdbf4e30.
Diffstat (limited to 'libavformat/concatdec.c')
-rw-r--r--libavformat/concatdec.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c
index 934e9c02fc..ed6b9d8044 100644
--- a/libavformat/concatdec.c
+++ b/libavformat/concatdec.c
@@ -118,7 +118,7 @@ static int add_file(AVFormatContext *avf, char *filename, ConcatFile **rfile,
size_t url_len;
int ret;
- if (cat->safe > 0 && !safe_filename(filename)) {
+ if (cat->safe && !safe_filename(filename)) {
av_log(avf, AV_LOG_ERROR, "Unsafe file name '%s'\n", filename);
FAIL(AVERROR(EPERM));
}
@@ -476,8 +476,6 @@ static int concat_read_header(AVFormatContext *avf)
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);
@@ -757,7 +755,7 @@ static int concat_seek(AVFormatContext *avf, int stream,
static const AVOption options[] = {
{ "safe", "enable safe mode",
- OFFSET(safe), AV_OPT_TYPE_BOOL, {.i64 = 1}, -1, 1, DEC },
+ OFFSET(safe), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, DEC },
{ "auto_convert", "automatically convert bitstream format",
OFFSET(auto_convert), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, DEC },
{ "segment_time_metadata", "output file segment start time and duration as packet metadata",