[Mplayer-cvslog] CVS: main/libmpdemux demux_viv.c,1.4,1.5

Alex Beregszaszi alex at mplayer.dev.hu
Fri Nov 9 23:17:38 CET 2001


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv2693

Modified Files:
	demux_viv.c 
Log Message:
freeing up space and some debug

Index: demux_viv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_viv.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demux_viv.c	9 Nov 2001 16:37:05 -0000	1.4
+++ demux_viv.c	9 Nov 2001 22:17:35 -0000	1.5
@@ -152,6 +152,13 @@
 	/* get next token */
 	token = strtok(NULL, (char *)&("\x0d\x0a"));
     }
+    
+    if (buf)
+	free(buf);
+    if (opt)
+	free(opt);
+    if (param)
+	free(param);
 }
 
 int vivo_check_file(demuxer_t* demuxer){
@@ -490,6 +497,10 @@
 		sh->bih->biSizeImage=sh->bih->biWidth*sh->bih->biHeight*3;
 		demuxer->video->sh=sh; sh->ds=demuxer->video;
 		demuxer->video->id=0;
+
+		printf("VIVO Video stream %d size: display: %dx%d, codec: %dx%d\n",
+		    demuxer->video->id, sh->disp_w, sh->disp_h, sh->bih->biWidth,
+		    sh->bih->biHeight);
 }
 
 if(demuxer->audio->id>=-1){
@@ -497,16 +508,19 @@
     mp_msg(MSGT_DEMUX,MSGL_ERR,"VIVO: " MSGTR_MissingAudioStream);
   } else
 {		sh_audio_t* sh=new_sh_audio(demuxer,1);
+
 		sh->format=0x111; // 0x112
 		// Emulate WAVEFORMATEX struct:
 		sh->wf=malloc(sizeof(WAVEFORMATEX));
 		memset(sh->wf,0,sizeof(WAVEFORMATEX));
 		sh->wf->nChannels=1;
 		sh->wf->wBitsPerSample=16;
+//		sh->wf->wBitsPerSample=8;
 		if (priv->samplerate)
 		    sh->wf->nSamplesPerSec=priv->samplerate;
 		else
 		    sh->wf->nSamplesPerSec=22050;
+//		    sh->wf->nSamplesPerSec=8000;
 		sh->wf->nAvgBytesPerSec=sh->wf->nChannels*sh->wf->wBitsPerSample*sh->wf->nSamplesPerSec/8;
 		demuxer->audio->sh=sh; sh->ds=demuxer->audio;
 		demuxer->audio->id=1;
@@ -515,3 +529,20 @@
 
 }
 
+void demux_close_vivo(demuxer_t *demuxer)
+{
+    vivo_priv_t* priv=demuxer->priv;
+    
+    if (priv->title)
+	free(priv->title);
+    if (priv->author)
+	free(priv->author);
+    if (priv->copyright)
+	free(priv->copyright);
+    if (priv->producer)
+	free(priv->producer);
+    if (priv)
+	free(priv);
+
+    return;
+}




More information about the MPlayer-cvslog mailing list