# HG changeset patch # User reimar # Date 1103300630 0 # Node ID 67912fc34e0481a2d04218035251a804e69de509 # Parent 83a1fd8cbdd11b57d7939ec93f1c65131a76d1d4 Set mixer.afilter at a more appropriate place. diff -r 83a1fd8cbdd1 -r 67912fc34e04 mplayer.c --- a/mplayer.c Fri Dec 17 13:30:29 2004 +0000 +++ b/mplayer.c Fri Dec 17 16:23:50 2004 +0000 @@ -924,8 +924,12 @@ static int build_afilter_chain(sh_audio_t *sh_audio, ao_data_t *ao_data) { int new_srate; + int result; if (!sh_audio) + { + mixer.afilter = NULL; return 0; + } new_srate = sh_audio->samplerate * playback_speed; if (new_srate != ao_data->samplerate) { // limits are taken from libaf/af_resample.c @@ -935,11 +939,13 @@ new_srate = 192000; playback_speed = (float)new_srate / (float)sh_audio->samplerate; } - return init_audio_filters(sh_audio, new_srate, + result = init_audio_filters(sh_audio, new_srate, sh_audio->channels, sh_audio->sample_format, sh_audio->samplesize, ao_data->samplerate, ao_data->channels, ao_data->format, audio_out_format_bits(ao_data->format) / 8, /* ao_data.bps, */ ao_data->outburst * 4, ao_data->buffersize); + mixer.afilter = sh_audio->afilter; + return result; } int main(int argc,char* argv[]){ @@ -2128,7 +2134,6 @@ #endif } mixer.audio_out = audio_out; - mixer.afilter = sh_audio ? sh_audio->afilter : NULL; mixer.volstep = volstep; }