Mercurial > mplayer.hg
diff mencoder.c @ 24894:2bfc75674b71
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.
author | uau |
---|---|
date | Thu, 01 Nov 2007 06:52:28 +0000 |
parents | 80180dc13565 |
children | e82ecde2cbd4 |
line wrap: on
line diff
--- a/mencoder.c Thu Nov 01 06:52:23 2007 +0000 +++ b/mencoder.c Thu Nov 01 06:52:28 2007 +0000 @@ -914,10 +914,9 @@ 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(!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 @@ 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); }