[MPlayer-dev-eng] [PATCH] af_pan.c: Avoid zero output channels when reinit af pan
Zuxy Meng
zuxy.meng at gmail.com
Thu Jun 7 13:00:51 CEST 2007
Hi,
2007/6/7, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Thu, Jun 07, 2007 at 09:50:08AM +0800, Zuxy Meng wrote:
> > 2007/6/5, Zuxy Meng <zuxy.meng at gmail.com>:
> > > 2007/6/5, Reimar Doeffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > > > On Tue, Jun 05, 2007 at 12:55:52PM +0200, Reimar Doeffinger wrote:
> > > > > On Tue, Jun 05, 2007 at 05:32:53PM +0800, Zuxy Meng wrote:
> > > > > [...]
> > > > > > But instead we call af_add() for pan, the sequence will be
> > > > > > AF_CONTROL_POST_CREATE->AF_CONTROL_REINIT->AF_CONTROL_PAN_NOUT. If we
> > > > > > don't assign a non-zero value to af->data->nch, AF_CONTROL_REINT of af
> > > > > > pan will always fail and we have no chance to add this filter at
> > > > > > runtime, which is needed for (soft) audio balance control.
> > > > >
> > > > > Well, IMO if a filter needs more data to work, make sure it is created with
> > > > > sufficient information instead of letting it dangle in an inconsistent
> > > > > state.
> > > > > E.g. use af_create with e.g. af_append or expand af_add to support a
> > > > > commandline.
> > > >
> > > > If you don't want to do it like this, then please let use first see the
> > > > code that needs it. I'd guess that would help both with finding a better
> > > > solution and convincing be to be okay with this one.
> > >
> > > It's in another patch, namely the audio balance feature.
> >
> > What's your suggestion, Reimar?
>
> I don't think it's really the right solution, but a proper one might not
> be worth the effort. Though you might consider if initializing the nch
> to 1 during filter creation isn't the better (and simpler) solution.
I don't think it simpler; they're both conditional assignments. And at
least it makes life harder for the audio balance feature :-)
I can't judge if it's better, but IMHO not to change the number of
output is simply no worse.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the MPlayer-dev-eng
mailing list