dec_audio: fix behavior on format changes

Decoder overwrites parameters in sh_audio, but we still have old audio
in the old format to filter.
This commit is contained in:
wm4 2013-11-12 22:27:19 +01:00
parent cc5083cfe0
commit 9127aad2fd
1 changed files with 1 additions and 3 deletions

View File

@ -263,10 +263,8 @@ static int filter_n_bytes(sh_audio_t *sh, struct mp_audio_buffer *outbuf,
// Filter
struct mp_audio filter_input = {
.planes = {sh->a_buffer},
.rate = sh->samplerate,
};
mp_audio_set_format(&filter_input, sh->sample_format);
mp_audio_set_channels(&filter_input, &sh->channels);
mp_audio_copy_config(&filter_input, &sh->afilter->input);
filter_input.samples = len / filter_input.sstride;
struct mp_audio *filter_output = af_play(sh->afilter, &filter_input);