[MPlayer-dev-eng] [PATCH] Automatic downmix
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sat Sep 25 13:56:57 CEST 2010
On Sat, Sep 25, 2010 at 01:37:53PM +0200, Clément Bœsch wrote:
> + return af_pan_str ? af_append(s, s->first, af_pan_str) : NULL;
Something like
if (af_pan_str)
return af_append...
return NULL;
or the other way around might be more readable, but it doesn't really matter.
> @@ -438,6 +457,9 @@
>
> // Check if this is the first call
> if(!s->first){
> + // Append a downmix pan filter at the beginning of the chain if needed
> + if (s->input.nch != audio_output_channels && audio_output_channels == 2)
> + af_downmix(s);
> // Add all filters in the list (if there are any)
> if(!s->cfg.list){ // To make automatic format conversion work
> if(!af_append(s,s->first,"dummy"))
I think this should now be
if (!s->first && !af_append...
the dummy filter should only be inserted if there's no other filters.
I changed the code in SVN a bit so you won't have to change this.
More information about the MPlayer-dev-eng
mailing list