summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-27 20:54:29 +0100
committerwm4 <wm4@nowhere>2013-11-27 21:14:39 +0100
commit1e96f5bcd98f41fa11d87f1a5236468f985327a9 (patch)
tree34d0de4c79fdd9023415f4d5bfe2380ae7bd55c5 /audio
parentf09b2ff661040828e2b17fad89613f7706b10e7d (diff)
downloadmpv-1e96f5bcd98f41fa11d87f1a5236468f985327a9.tar.bz2
mpv-1e96f5bcd98f41fa11d87f1a5236468f985327a9.tar.xz
Move some code from player to audio/video reset functions
Diffstat (limited to 'audio')
-rw-r--r--audio/decode/dec_audio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index 26452b702e..8cd7783069 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -349,8 +349,12 @@ int audio_decode(struct dec_audio *d_audio, struct mp_audio_buffer *outbuf,
void audio_reset_decoding(struct dec_audio *d_audio)
{
- d_audio->pts = MP_NOPTS_VALUE;
- d_audio->pts_offset = 0;
if (d_audio->ad_driver)
d_audio->ad_driver->control(d_audio, ADCTRL_RESET, NULL);
+ if (d_audio->afilter)
+ af_control_all(d_audio->afilter, AF_CONTROL_RESET, NULL);
+ d_audio->pts = MP_NOPTS_VALUE;
+ d_audio->pts_offset = 0;
+ if (d_audio->decode_buffer)
+ mp_audio_buffer_clear(d_audio->decode_buffer);
}