diff options
Diffstat (limited to 'audio')
-rw-r--r-- | audio/decode/ad.h | 2 | ||||
-rw-r--r-- | audio/decode/ad_lavc.c | 2 | ||||
-rw-r--r-- | audio/decode/ad_mpg123.c | 2 | ||||
-rw-r--r-- | audio/decode/dec_audio.c | 6 | ||||
-rw-r--r-- | audio/decode/dec_audio.h | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/audio/decode/ad.h b/audio/decode/ad.h index 9a696fb630..56f8944120 100644 --- a/audio/decode/ad.h +++ b/audio/decode/ad.h @@ -40,7 +40,7 @@ struct ad_functions { }; enum ad_ctrl { - ADCTRL_RESYNC_STREAM = 1, // resync, called after seeking + ADCTRL_RESET = 1, // flush and reset state, e.g. after seeking }; #endif /* MPLAYER_AD_H */ diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index 45e06c8b3d..4093fa77bd 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -301,7 +301,7 @@ static int control(struct dec_audio *da, int cmd, void *arg) { struct priv *ctx = da->priv; switch (cmd) { - case ADCTRL_RESYNC_STREAM: + case ADCTRL_RESET: avcodec_flush_buffers(ctx->avctx); ctx->frame.samples = 0; talloc_free(ctx->packet); diff --git a/audio/decode/ad_mpg123.c b/audio/decode/ad_mpg123.c index aacc1cb76b..f65553bd77 100644 --- a/audio/decode/ad_mpg123.c +++ b/audio/decode/ad_mpg123.c @@ -347,7 +347,7 @@ static int control(struct dec_audio *da, int cmd, void *arg) struct ad_mpg123_context *con = da->priv; switch (cmd) { - case ADCTRL_RESYNC_STREAM: + case ADCTRL_RESET: mpg123_close(con->handle); if (mpg123_open_feed(con->handle) != MPG123_OK) { 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); } diff --git a/audio/decode/dec_audio.h b/audio/decode/dec_audio.h index aac2bd4719..7e8896fa61 100644 --- a/audio/decode/dec_audio.h +++ b/audio/decode/dec_audio.h @@ -50,7 +50,7 @@ struct mp_decoder_list *audio_decoder_list(void); int audio_init_best_codec(struct dec_audio *d_audio, char *audio_decoders); int audio_decode(struct dec_audio *d_audio, struct mp_audio_buffer *outbuf, int minsamples); -void audio_resync_stream(struct dec_audio *d_audio); +void audio_reset_decoding(struct dec_audio *d_audio); void audio_uninit(struct dec_audio *d_audio); int audio_init_filters(struct dec_audio *d_audio, int in_samplerate, |