[MPlayer-users] channel switching and audio filters (was Re: MPlayer-users Digest, Vol 48, Issue 17)

Ivo ivop at euronet.nl
Sat Dec 8 23:03:51 CET 2007


Hi,

On Saturday 08 December 2007 19:15, Reimar Döffinger wrote:
> On Sat, Dec 08, 2007 at 06:01:46PM +0100, Ivo wrote:
> > It looks like the whole audio filter chain is destroyed and rebuilt
> > with default values instead of those given on the command line. I am
> > not that familiar with the channel switching code, but if I can find
> > some time tonight, I will look into it.
>
> This probably is a known bug in the parsing code, I didn't check for a
> really sane/clean fix yet, but try this change:
>
> Index: libaf/af.c
> ===================================================================
> --- libaf/af.c  (revision 25286)
> +++ libaf/af.c  (working copy)
> @@ -118,7 +118,10 @@
>    strsep(&cmdline, "=");
>
>    // Find filter from name
> -  if(NULL == (new->info=af_find(name)))
> +  new->info=af_find(name);
> +  // restore '=' broken by strsep (wrong, name is needed later)
> +  if (cmdline) cmdline[-1] = '=';
> +  if (!new->info)
>      goto err_out;
>
>    /* Make sure that the filter is not already in the list if it is

This does indeed fix the problem. I tested it with both af_volume and 
af_ladspa and channel switching works fine then.

--Ivo



More information about the MPlayer-users mailing list