Mercurial > mplayer.hg
changeset 6049:4bae3caef7a9
always reser audio input buffer pointer
author | arpi |
---|---|
date | Sun, 12 May 2002 00:44:32 +0000 |
parents | 4301077b29d0 |
children | de28fffadb2e |
files | libmpcodecs/ad_libmad.c libmpcodecs/ad_sample.c libmpcodecs/dec_audio.c |
diffstat | 3 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_libmad.c Sun May 12 00:40:22 2002 +0000 +++ b/libmpcodecs/ad_libmad.c Sun May 12 00:44:32 2002 +0000 @@ -160,7 +160,6 @@ // various optional functions you MAY implement: switch(cmd){ case ADCTRL_RESYNC_STREAM: - sh->a_in_buffer_len=0; // clear audio input buffer this->have_frame=0; mad_synth_init (&this->synth); mad_stream_init (&this->stream);
--- a/libmpcodecs/ad_sample.c Sun May 12 00:40:22 2002 +0000 +++ b/libmpcodecs/ad_sample.c Sun May 12 00:44:32 2002 +0000 @@ -113,8 +113,7 @@ switch(cmd){ case ADCTRL_RESYNC_STREAM: // it is called once after seeking, to resync. - // if you don't return CONTROL_TRUE, it will defaults to: - // sh_audio->a_in_buffer_len=0; // clear input buffer + // Note: sh_audio->a_in_buffer_len=0; is done _before_ this call! ... return CONTROL_TRUE; case ADCTRL_SKIP_FRAME:
--- a/libmpcodecs/dec_audio.c Sun May 12 00:40:22 2002 +0000 +++ b/libmpcodecs/dec_audio.c Sun May 12 00:44:32 2002 +0000 @@ -134,10 +134,9 @@ void resync_audio_stream(sh_audio_t *sh_audio) { + sh_audio->a_in_buffer_len=0; // clear audio input buffer if(!sh_audio->inited) return; - if(mpadec->control(sh_audio,ADCTRL_RESYNC_STREAM,NULL)==CONTROL_TRUE) return; - // default resync code: - sh_audio->a_in_buffer_len=0; // clear audio input buffer + mpadec->control(sh_audio,ADCTRL_RESYNC_STREAM,NULL); } void skip_audio_frame(sh_audio_t *sh_audio)