[FFmpeg-cvslog] pan: raise correct error when there is no param specified.

Clément Bœsch git at videolan.org
Tue Jan 24 10:44:35 CET 2012


ffmpeg | branch: master | Clément Bœsch <clement.boesch at smartjog.com> | Tue Jan 17 11:01:37 2012 +0100| [66fdbcbbc9d24e18c9faaa1f56bce85ccbb25e07] | committer: Clément Bœsch

pan: raise correct error when there is no param specified.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66fdbcbbc9d24e18c9faaa1f56bce85ccbb25e07
---

 libavfilter/af_pan.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
index ca14eca..a62dea1 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);



More information about the ffmpeg-cvslog mailing list