[Mplayer-cvslog] CVS: main/libmpcodecs ad_libmad.c,1.1,1.2 ad_sample.c,1.1,1.2 dec_audio.c,1.3,1.4

Arpi of Ize arpi at mplayerhq.hu
Sun May 12 02:44:34 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv29580

Modified Files:
	ad_libmad.c ad_sample.c dec_audio.c 
Log Message:
always reser audio input buffer pointer

Index: ad_libmad.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_libmad.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ad_libmad.c	3 Apr 2002 20:14:18 -0000	1.1
+++ ad_libmad.c	12 May 2002 00:44:32 -0000	1.2
@@ -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);

Index: ad_sample.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_sample.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ad_sample.c	1 Apr 2002 19:14:14 -0000	1.1
+++ ad_sample.c	12 May 2002 00:44:32 -0000	1.2
@@ -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:

Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_audio.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dec_audio.c	2 May 2002 10:40:35 -0000	1.3
+++ dec_audio.c	12 May 2002 00:44:32 -0000	1.4
@@ -134,10 +134,9 @@
 
 void resync_audio_stream(sh_audio_t *sh_audio)
 {
-  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
+  if(!sh_audio->inited) return;
+  mpadec->control(sh_audio,ADCTRL_RESYNC_STREAM,NULL);
 }
 
 void skip_audio_frame(sh_audio_t *sh_audio)




More information about the MPlayer-cvslog mailing list