aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-02-02 12:50:38 +0100
committerPaul B Mahol <onemda@gmail.com>2021-02-03 15:51:40 +0100
commitb4ad669a425c9ec169e059bacd378f525cf53e9c (patch)
treea08ad78f7ead6cc0746d0ef74879522a4be341e2 /libavfilter
parentf6621a8e72c010faa77e8d0239fd45a4d71cfbf8 (diff)
downloadffmpeg-b4ad669a425c9ec169e059bacd378f525cf53e9c.tar.gz
avfilter/avfilter: mark enable as runtime option too
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c3
-rw-r--r--libavfilter/internal.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 8ff22c71e3..4c52d83842 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -620,11 +620,12 @@ static const AVClass *filter_child_class_iterate(void **iter)
#define OFFSET(x) offsetof(AVFilterContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM
+#define TFLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
static const AVOption avfilter_options[] = {
{ "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
{ "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = FLAGS, .unit = "thread_type" },
- { "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
+ { "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = TFLAGS },
{ "threads", "Allowed number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "extra_hw_frames", "Number of extra hardware frames to allocate for the user",
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 183215d152..f3b434dbe9 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -368,6 +368,8 @@ int ff_filter_get_nb_threads(AVFilterContext *ctx);
/**
* Generic processing of user supplied commands that are set
* in the same way as the filter options.
+ * NOTE: 'enable' option is handled separately, and not by
+ * this function.
*/
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd,
const char *arg, char *res, int res_len, int flags);