summaryrefslogtreecommitdiff
path: root/libavfilter/af_pan.c
diff options
context:
space:
mode:
authorClément Bœsch <clement.boesch@smartjog.com>2012-01-17 11:01:37 +0100
committerClément Bœsch <ubitux@gmail.com>2012-01-24 10:43:41 +0100
commit66fdbcbbc9d24e18c9faaa1f56bce85ccbb25e07 (patch)
treeb14ad497fdc2c8f4b570b1f4b51210c3d4729880 /libavfilter/af_pan.c
parent0bb57f8bf029427059be21a562527dcfa0e264c9 (diff)
pan: raise correct error when there is no param specified.
Diffstat (limited to 'libavfilter/af_pan.c')
-rw-r--r--libavfilter/af_pan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index ca14eca533..a62dea19e7 100644
--- a/libavfilter/af_pan.c
+++ b/libavfilter/af_pan.c
@@ -95,6 +95,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args0, void *opaque)
int nb_in_channels[2] = { 0, 0 }; // number of unnamed and named input channels
double gain;
+ if (!args0) {
+ av_log(ctx, AV_LOG_ERROR,
+ "pan filter needs a channel layout and a set "
+ "of channels definitions as parameter\n");
+ return AVERROR(EINVAL);
+ }
if (!args)
return AVERROR(ENOMEM);
arg = av_strtok(args, ":", &tokenizer);