From 6338c068a2f85dce3b4dee4c89c2047c8dbe5be2 Mon Sep 17 00:00:00 2001 From: uau Date: Thu, 1 Nov 2007 06:52:28 +0000 Subject: Simplify init_audio_filters() arguments Remove the following arguments as redundant: in_channels, in_format, out_minsize, out_maxsize. The first two always equal fields of the sh_audio_t struct given as the first argument to the function. The last two are unused after the allocation of sh_audio->a_out_buffer was changed to be done on demand. After the out_minsize and out_maxsize arguments are removed the function preinit_audio_filters() is identical to init_audio_filters(), so remove it and use the latter instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24922 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index 219f3ff79c..835a65fcfa 100644 --- a/mencoder.c +++ b/mencoder.c @@ -914,10 +914,9 @@ mux_a->codec=out_audio_codec; ao_data.samplerate = force_srate; ao_data.channels = 0; ao_data.format = audio_output_format; -if(!preinit_audio_filters(sh_audio, +if(!init_audio_filters(sh_audio, // input: new_srate, - sh_audio->channels, sh_audio->sample_format, // output: &ao_data.samplerate, &ao_data.channels, &ao_data.format)) { mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_AudioFilterChainPreinitError); @@ -932,9 +931,8 @@ if(mux_a->codec != ACODEC_COPY) { if(!aencoder) mencoder_exit(1, NULL); if(!init_audio_filters(sh_audio, - new_srate, sh_audio->channels, sh_audio->sample_format, - &aparams.sample_rate, &aparams.channels, &aencoder->input_format, - aencoder->min_buffer_size, aencoder->max_buffer_size)) { + new_srate, + &aparams.sample_rate, &aparams.channels, &aencoder->input_format)) { mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_NoMatchingFilter); mencoder_exit(1,NULL); } @@ -1031,11 +1029,9 @@ else { int out_srate = mux_a->wf->nSamplesPerSec; int out_channels = mux_a->wf->nChannels; int out_format = aencoder->input_format; - int out_minsize = aencoder->min_buffer_size; - int out_maxsize = aencoder->max_buffer_size; - if (!init_audio_filters(sh_audio, new_srate, sh_audio->channels, - sh_audio->sample_format, &out_srate, &out_channels, - &out_format, out_minsize, out_maxsize)) { + if (!init_audio_filters(sh_audio, new_srate, + &out_srate, &out_channels, + &out_format)) { mp_msg(MSGT_CPLAYER, MSGL_FATAL, MSGTR_NoMatchingFilter); mencoder_exit(1, NULL); } -- cgit v1.2.3