diff mbox series

[FFmpeg-devel] lavfi/setpts: fix setpts/asetpts option dump error

Message ID 1593436901-19675-1-git-send-email-mypopydev@gmail.com
State New
Headers show
Series [FFmpeg-devel] lavfi/setpts: fix setpts/asetpts option dump error
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Jun Zhao June 29, 2020, 1:21 p.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

fix the command fmpeg -h filter=setpts/asetpts both dump the expr
option with "FVA" flags.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavfilter/setpts.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
index c7c3836..8547514 100644
--- a/libavfilter/setpts.c
+++ b/libavfilter/setpts.c
@@ -266,9 +266,11 @@  static av_cold void uninit(AVFilterContext *ctx)
 }
 
 #define OFFSET(x) offsetof(SetPTSContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
+#define V AV_OPT_FLAG_VIDEO_PARAM
+#define A AV_OPT_FLAG_AUDIO_PARAM
+#define F AV_OPT_FLAG_FILTERING_PARAM
 static const AVOption options[] = {
-    { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = FLAGS },
+    { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = V|F },
     { NULL }
 };
 
@@ -310,7 +312,10 @@  AVFilter ff_vf_setpts = {
 
 #if CONFIG_ASETPTS_FILTER
 
-#define asetpts_options options
+static const AVOption asetpts_options[] = {
+    { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = A|F },
+    { NULL }
+};
 AVFILTER_DEFINE_CLASS(asetpts);
 
 static const AVFilterPad asetpts_inputs[] = {