diff mbox series

[FFmpeg-devel,v2,1/2] lavfi/setpts: fix setpts/asetpts option dump error

Message ID 1594466515-32524-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit 04037e296619f64d35b79ff5a00c3e6e9a05b0b8
Headers show
Series [FFmpeg-devel,v2,1/2] lavfi/setpts: fix setpts/asetpts option dump error | expand

Checks

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

Commit Message

Jun Zhao July 11, 2020, 11:21 a.m. UTC
From: Jun Zhao <barryjzhao@tencent.com>

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

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

Comments

Paul B Mahol July 11, 2020, 11:31 a.m. UTC | #1
ok

On 7/11/20, Jun Zhao <mypopydev@gmail.com> wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> fix the command ffmpeg -h filter=setpts/asetpts both dump the expr
> option with "FVA" flags.
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavfilter/setpts.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
> index 6506653..440a218 100644
> --- a/libavfilter/setpts.c
> +++ b/libavfilter/setpts.c
> @@ -262,14 +262,15 @@ 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
> -static const AVOption options[] = {
> -    { "expr", "Expression determining the frame timestamp",
> OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = FLAGS },
> -    { NULL }
> -};
> +#define V AV_OPT_FLAG_VIDEO_PARAM
> +#define A AV_OPT_FLAG_AUDIO_PARAM
> +#define F AV_OPT_FLAG_FILTERING_PARAM
>
>  #if CONFIG_SETPTS_FILTER
> -#define setpts_options options
> +static const AVOption setpts_options[] = {
> +    { "expr", "Expression determining the frame timestamp",
> OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = V|F },
> +    { NULL }
> +};
>  AVFILTER_DEFINE_CLASS(setpts);
>
>  static const AVFilterPad avfilter_vf_setpts_inputs[] = {
> @@ -306,7 +307,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[] = {
> --
> 2.7.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Jun Zhao July 12, 2020, 2:49 p.m. UTC | #2
On Sat, Jul 11, 2020 at 7:58 PM Paul B Mahol <onemda@gmail.com> wrote:
>
> ok
Thx, pushed
>
> On 7/11/20, Jun Zhao <mypopydev@gmail.com> wrote:
> > From: Jun Zhao <barryjzhao@tencent.com>
> >
> > fix the command ffmpeg -h filter=setpts/asetpts both dump the expr
> > option with "FVA" flags.
> >
> > Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> > ---
> >  libavfilter/setpts.c | 18 +++++++++++-------
> >  1 file changed, 11 insertions(+), 7 deletions(-)
> >
> > diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
> > index 6506653..440a218 100644
> > --- a/libavfilter/setpts.c
> > +++ b/libavfilter/setpts.c
> > @@ -262,14 +262,15 @@ 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
> > -static const AVOption options[] = {
> > -    { "expr", "Expression determining the frame timestamp",
> > OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = FLAGS },
> > -    { NULL }
> > -};
> > +#define V AV_OPT_FLAG_VIDEO_PARAM
> > +#define A AV_OPT_FLAG_AUDIO_PARAM
> > +#define F AV_OPT_FLAG_FILTERING_PARAM
> >
> >  #if CONFIG_SETPTS_FILTER
> > -#define setpts_options options
> > +static const AVOption setpts_options[] = {
> > +    { "expr", "Expression determining the frame timestamp",
> > OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = V|F },
> > +    { NULL }
> > +};
> >  AVFILTER_DEFINE_CLASS(setpts);
> >
> >  static const AVFilterPad avfilter_vf_setpts_inputs[] = {
> > @@ -306,7 +307,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[] = {
> > --
> > 2.7.4
diff mbox series

Patch

diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c
index 6506653..440a218 100644
--- a/libavfilter/setpts.c
+++ b/libavfilter/setpts.c
@@ -262,14 +262,15 @@  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
-static const AVOption options[] = {
-    { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = FLAGS },
-    { NULL }
-};
+#define V AV_OPT_FLAG_VIDEO_PARAM
+#define A AV_OPT_FLAG_AUDIO_PARAM
+#define F AV_OPT_FLAG_FILTERING_PARAM
 
 #if CONFIG_SETPTS_FILTER
-#define setpts_options options
+static const AVOption setpts_options[] = {
+    { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = V|F },
+    { NULL }
+};
 AVFILTER_DEFINE_CLASS(setpts);
 
 static const AVFilterPad avfilter_vf_setpts_inputs[] = {
@@ -306,7 +307,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[] = {