[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 12:55:52 CEST 2007


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

Greetings,
Reimar Doeffinger



More information about the MPlayer-dev-eng mailing list