diff mbox

[FFmpeg-devel] avfilter/af_amerge: allow merging 1 input only

Message ID 1473106596-17016-1-git-send-email-cus@passwd.hu
State Accepted
Commit 025db5afaf28228aa14f9621b09bd424a2c1adfb
Headers show

Commit Message

Marton Balint Sept. 5, 2016, 8:16 p.m. UTC
Useful when the amerge filter parameters are generated from a script based on
the number of input streams, by allowing 1 input it does not have to be handled
specially.

The split filter also allows 1 output, so it is more consistent to allow
merging 1 input as well.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavfilter/af_amerge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nicolas George Sept. 10, 2016, 9:22 a.m. UTC | #1
Le decadi 20 fructidor, an CCXXIV, Marton Balint a écrit :
> Useful when the amerge filter parameters are generated from a script based on
> the number of input streams, by allowing 1 input it does not have to be handled
> specially.
> 
> The split filter also allows 1 output, so it is more consistent to allow
> merging 1 input as well.

LGTM.

Regards,
Marton Balint Sept. 13, 2016, 9:09 p.m. UTC | #2
On Sat, 10 Sep 2016, Nicolas George wrote:

> Le decadi 20 fructidor, an CCXXIV, Marton Balint a écrit :
>> Useful when the amerge filter parameters are generated from a script based on
>> the number of input streams, by allowing 1 input it does not have to be handled
>> specially.
>>
>> The split filter also allows 1 output, so it is more consistent to allow
>> merging 1 input as well.
>
> LGTM.
>

Thanks, applied.

Regards,
Marton
diff mbox

Patch

diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 2b4edb0..4a8c6d5 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -52,7 +52,7 @@  typedef struct {
 
 static const AVOption amerge_options[] = {
     { "inputs", "specify the number of inputs", OFFSET(nb_inputs),
-      AV_OPT_TYPE_INT, { .i64 = 2 }, 2, SWR_CH_MAX, FLAGS },
+      AV_OPT_TYPE_INT, { .i64 = 2 }, 1, SWR_CH_MAX, FLAGS },
     { NULL }
 };