summaryrefslogtreecommitdiffstats
path: root/audio/decode/dec_audio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-10 20:16:25 +0100
committerwm4 <wm4@nowhere>2014-11-10 22:02:05 +0100
commite094e9cb75f9802d8da07eb75cee4d91c9786558 (patch)
tree84f6ba161fdcb0515c840ca7dd8db60be681dc65 /audio/decode/dec_audio.c
parent995a6af78734820007eb8a1ae3b543fd9d9636e1 (diff)
downloadmpv-e094e9cb75f9802d8da07eb75cee4d91c9786558.tar.bz2
mpv-e094e9cb75f9802d8da07eb75cee4d91c9786558.tar.xz
audio: change how filters are inserted on playback speed changes
Use a pseudo-filter when changing speed with resampling, instead of somehow changing a samplerate somewhere. This uses the same underlying mechanism, but is a bit more structured and cleaner. It also makes some of the following changes easier. Since we now always use filters to change audio speed, move most of the work set_playback_speed() does to recreate_audio_filters().
Diffstat (limited to 'audio/decode/dec_audio.c')
-rw-r--r--audio/decode/dec_audio.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index 29674f3e0e..8b38b71bc7 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -227,7 +227,6 @@ static int filter_n_bytes(struct dec_audio *da, struct mp_audio_buffer *outbuf,
// Filter
struct mp_audio filter_data;
mp_audio_buffer_peek(da->decode_buffer, &filter_data);
- filter_data.rate = da->afilter->input.rate; // due to playback speed change
len = MPMIN(filter_data.samples, len);
filter_data.samples = len;
bool eof = error == AD_EOF && filter_data.samples == 0;