diff mbox series

[FFmpeg-devel,v1] avfilter/af_amix: change the max range of the number of inputs

Message ID 20200106102923.5280-1-lance.lmwang@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,v1] avfilter/af_amix: change the max range of the number of inputs
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang Jan. 6, 2020, 10:29 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/af_amix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Jan. 6, 2020, 12:28 p.m. UTC | #1
Limit is not real, its too big.

On 1/6/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/af_amix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
> index 89a1b0568f..1e1753b078 100644
> --- a/libavfilter/af_amix.c
> +++ b/libavfilter/af_amix.c
> @@ -182,7 +182,7 @@ typedef struct MixContext {
>  #define F AV_OPT_FLAG_FILTERING_PARAM
>  static const AVOption amix_options[] = {
>      { "inputs", "Number of inputs.",
> -            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 1024, A|F
> },
> +            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX,
> A|F },
>      { "duration", "How to determine the end-of-stream.",
>              OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 =
> DURATION_LONGEST }, 0,  2, A|F, "duration" },
>          { "longest",  "Duration of longest input.",  0, AV_OPT_TYPE_CONST,
> { .i64 = DURATION_LONGEST  }, 0, 0, A|F, "duration" },
> --
> 2.21.0
>
> _______________________________________________
> 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".
Limin Wang Jan. 6, 2020, 1:24 p.m. UTC | #2
On Mon, Jan 06, 2020 at 01:28:45PM +0100, Paul B Mahol wrote:
> Limit is not real, its too big.

So what's reasonable value to use?
I notice video mix choose INT_MAX, so I use the same.

[lmwang@vpn ffmpeg]$ grep nb_inputs libavfilter/vf_mix.c |grep INT_MAX
    { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=2}, 2, INT_MAX, .flags = FLAGS },

> 
> On 1/6/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> > From: Limin Wang <lance.lmwang@gmail.com>
> >
> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > ---
> >  libavfilter/af_amix.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
> > index 89a1b0568f..1e1753b078 100644
> > --- a/libavfilter/af_amix.c
> > +++ b/libavfilter/af_amix.c
> > @@ -182,7 +182,7 @@ typedef struct MixContext {
> >  #define F AV_OPT_FLAG_FILTERING_PARAM
> >  static const AVOption amix_options[] = {
> >      { "inputs", "Number of inputs.",
> > -            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 1024, A|F
> > },
> > +            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX,
> > A|F },
> >      { "duration", "How to determine the end-of-stream.",
> >              OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 =
> > DURATION_LONGEST }, 0,  2, A|F, "duration" },
> >          { "longest",  "Duration of longest input.",  0, AV_OPT_TYPE_CONST,
> > { .i64 = DURATION_LONGEST  }, 0, 0, A|F, "duration" },
> > --
> > 2.21.0
> >
> > _______________________________________________
> > 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".
Paul B Mahol Jan. 6, 2020, 1:27 p.m. UTC | #3
On 1/6/20, Limin Wang <lance.lmwang@gmail.com> wrote:
> On Mon, Jan 06, 2020 at 01:28:45PM +0100, Paul B Mahol wrote:
>> Limit is not real, its too big.
>
> So what's reasonable value to use?
> I notice video mix choose INT_MAX, so I use the same.

INT16_MAX seems high enough.

>
> [lmwang@vpn ffmpeg]$ grep nb_inputs libavfilter/vf_mix.c |grep INT_MAX
>     { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT,
> {.i64=2}, 2, INT_MAX, .flags = FLAGS },
>
>>
>> On 1/6/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
>> > From: Limin Wang <lance.lmwang@gmail.com>
>> >
>> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
>> > ---
>> >  libavfilter/af_amix.c | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
>> > index 89a1b0568f..1e1753b078 100644
>> > --- a/libavfilter/af_amix.c
>> > +++ b/libavfilter/af_amix.c
>> > @@ -182,7 +182,7 @@ typedef struct MixContext {
>> >  #define F AV_OPT_FLAG_FILTERING_PARAM
>> >  static const AVOption amix_options[] = {
>> >      { "inputs", "Number of inputs.",
>> > -            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 1024,
>> > A|F
>> > },
>> > +            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1,
>> > INT_MAX,
>> > A|F },
>> >      { "duration", "How to determine the end-of-stream.",
>> >              OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 =
>> > DURATION_LONGEST }, 0,  2, A|F, "duration" },
>> >          { "longest",  "Duration of longest input.",  0,
>> > AV_OPT_TYPE_CONST,
>> > { .i64 = DURATION_LONGEST  }, 0, 0, A|F, "duration" },
>> > --
>> > 2.21.0
>> >
>> > _______________________________________________
>> > 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".
>
> --
> Thanks,
> Limin Wang
> _______________________________________________
> 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".
Limin Wang Jan. 6, 2020, 1:33 p.m. UTC | #4
On Mon, Jan 06, 2020 at 02:27:36PM +0100, Paul B Mahol wrote:
> On 1/6/20, Limin Wang <lance.lmwang@gmail.com> wrote:
> > On Mon, Jan 06, 2020 at 01:28:45PM +0100, Paul B Mahol wrote:
> >> Limit is not real, its too big.
> >
> > So what's reasonable value to use?
> > I notice video mix choose INT_MAX, so I use the same.
> 
> INT16_MAX seems high enough.

Sure, I'll update to use INT16_MAX.

> 
> >
> > [lmwang@vpn ffmpeg]$ grep nb_inputs libavfilter/vf_mix.c |grep INT_MAX
> >     { "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT,
> > {.i64=2}, 2, INT_MAX, .flags = FLAGS },
> >
> >>
> >> On 1/6/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> >> > From: Limin Wang <lance.lmwang@gmail.com>
> >> >
> >> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> >> > ---
> >> >  libavfilter/af_amix.c | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
> >> > index 89a1b0568f..1e1753b078 100644
> >> > --- a/libavfilter/af_amix.c
> >> > +++ b/libavfilter/af_amix.c
> >> > @@ -182,7 +182,7 @@ typedef struct MixContext {
> >> >  #define F AV_OPT_FLAG_FILTERING_PARAM
> >> >  static const AVOption amix_options[] = {
> >> >      { "inputs", "Number of inputs.",
> >> > -            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 1024,
> >> > A|F
> >> > },
> >> > +            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1,
> >> > INT_MAX,
> >> > A|F },
> >> >      { "duration", "How to determine the end-of-stream.",
> >> >              OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 =
> >> > DURATION_LONGEST }, 0,  2, A|F, "duration" },
> >> >          { "longest",  "Duration of longest input.",  0,
> >> > AV_OPT_TYPE_CONST,
> >> > { .i64 = DURATION_LONGEST  }, 0, 0, A|F, "duration" },
> >> > --
> >> > 2.21.0
> >> >
> >> > _______________________________________________
> >> > 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".
> >
> > --
> > Thanks,
> > Limin Wang
> > _______________________________________________
> > 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".
> _______________________________________________
> 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".
diff mbox series

Patch

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 89a1b0568f..1e1753b078 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -182,7 +182,7 @@  typedef struct MixContext {
 #define F AV_OPT_FLAG_FILTERING_PARAM
 static const AVOption amix_options[] = {
     { "inputs", "Number of inputs.",
-            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, 1024, A|F },
+            OFFSET(nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, A|F },
     { "duration", "How to determine the end-of-stream.",
             OFFSET(duration_mode), AV_OPT_TYPE_INT, { .i64 = DURATION_LONGEST }, 0,  2, A|F, "duration" },
         { "longest",  "Duration of longest input.",  0, AV_OPT_TYPE_CONST, { .i64 = DURATION_LONGEST  }, 0, 0, A|F, "duration" },