[MPlayer-dev-eng] [PATCH] af_pan.c: Avoid zero output channels when reinit af pan

Zuxy Meng zuxy.meng at gmail.com
Wed May 30 16:49:27 CEST 2007


Hi,

af pan doesn't allow zero output channel at initialization, which
makes it impossible to af_add it. This patch initialize the number of
output channels as the same as that of input channels.

It might fix Bug 818 too but I'm unsure about that.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
Index: libaf/af_pan.c
===================================================================
--- libaf/af_pan.c	?????? 23404??
+++ libaf/af_pan.c	????????????
@@ -35,6 +35,8 @@
     // Sanity check
     if(!arg) return AF_ERROR;
 
+    if (af->data->nch == 0)
+      af->data->nch = ((af_data_t*)arg)->nch;
     af->data->rate   = ((af_data_t*)arg)->rate;
     af->data->format = AF_FORMAT_FLOAT_NE;
     af->data->bps    = 4;


More information about the MPlayer-dev-eng mailing list