diff options
author | wm4 <wm4@nowhere> | 2013-11-12 22:27:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-12 23:38:36 +0100 |
commit | 9127aad2fdca0a64f1014c712e19252c67112c47 (patch) | |
tree | 1b54471131de46c487c40651e5200e7c2f288a6e /audio/decode/dec_audio.c | |
parent | cc5083cfe00e6872d0b52b6be917b80582c64e52 (diff) | |
download | mpv-9127aad2fdca0a64f1014c712e19252c67112c47.tar.bz2 mpv-9127aad2fdca0a64f1014c712e19252c67112c47.tar.xz |
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.
Diffstat (limited to 'audio/decode/dec_audio.c')
-rw-r--r-- | audio/decode/dec_audio.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |