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

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Jun 5 11:16:40 CEST 2007


Hello,
On Sun, Jun 03, 2007 at 10:07:57PM +0800, Zuxy Meng wrote:
> 2007/6/3, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > On Wed, May 30, 2007 at 10:49:27PM +0800, Zuxy Meng wrote:
> > [...]
> > > 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;
> >
> > IMO the bug is that af->data->nch should never be zero and the bug is
> > elsewhere.
> 
> Why? (af_data_t*)arg->nch shouldn't but af->data->nch may not be
> guaranteed to be nonzero. Actually all other filters initialize
> af->data->nch upon REINIT.

No, only those that do not change channels of course do it.
E.g. af_channels does not. In both cases the number of output channels
is specified on the command line, and should either be respected or the
user informed that the command line is incorrect instead of just doing
"something".

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list