From 9127aad2fdca0a64f1014c712e19252c67112c47 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 12 Nov 2013 22:27:19 +0100 Subject: 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. --- audio/decode/dec_audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'audio') diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index ebb54cb55a..6c4af89ef9 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -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); -- cgit v1.2.3