[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 13:39:26 CEST 2007


Hello,
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.

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list