summaryrefslogtreecommitdiffstats
path: root/audio/decode/dec_audio.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-27 20:54:07 +0100
committerwm4 <wm4@nowhere>2013-11-27 21:14:39 +0100
commitf09b2ff661040828e2b17fad89613f7706b10e7d (patch)
tree5c5b54a30cf6bf0e1ffda152be3e2b91b1f2a0e1 /audio/decode/dec_audio.c
parentf2b5267e88ca68dd6933c97aa4f12e5c073b5a48 (diff)
downloadmpv-f09b2ff661040828e2b17fad89613f7706b10e7d.tar.bz2
mpv-f09b2ff661040828e2b17fad89613f7706b10e7d.tar.xz
cosmetics: rename video/audio reset functions
These used the suffix _resync_stream, which is a bit misleading. Nothing gets "resynchronized", they really just reset state. (Some audio decoders actually used to "resync" by reading packets for resuming playback, but that's not the case anymore.) Also move the function in dec_video.c to the top of the file.
Diffstat (limited to 'audio/decode/dec_audio.c')
-rw-r--r--audio/decode/dec_audio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index 6f46b79a93..26452b702e 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -135,7 +135,7 @@ static const struct ad_functions *find_driver(const char *name)
int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders)
{
assert(!d_audio->ad_driver);
- audio_resync_stream(d_audio);
+ audio_reset_decoding(d_audio);
struct mp_decoder_entry *decoder = NULL;
struct mp_decoder_list *list =
@@ -347,10 +347,10 @@ int audio_decode(struct dec_audio *d_audio, struct mp_audio_buffer *outbuf,
return 0;
}
-void audio_resync_stream(struct dec_audio *d_audio)
+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_RESYNC_STREAM, NULL);
+ d_audio->ad_driver->control(d_audio, ADCTRL_RESET, NULL);
}