[Mplayer-cvslog] CVS: main mplayer.c,1.476,1.477

Zoltan Ponekker pontscho at mplayerhq.hu
Mon Apr 22 23:36:14 CEST 2002


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

Modified Files:
	mplayer.c 
Log Message:
fix audio only files play

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.476
retrieving revision 1.477
diff -u -r1.476 -r1.477
--- mplayer.c	19 Apr 2002 06:21:41 -0000	1.476
+++ mplayer.c	22 Apr 2002 21:36:05 -0000	1.477
@@ -769,6 +769,7 @@
 #ifdef HAVE_NEW_GUI
     if ( use_gui ) {
 
+      guiGetEvent( guiReDrawSubWindow,0 );
       while ( guiIntfStruct.Playing != 1 )
        {
 #ifdef HAVE_NEW_INPUT
@@ -1280,22 +1281,6 @@
 
 // ========== Init display (sh_video->disp_w*sh_video->disp_h/out_fmt) ============
 
-#ifdef HAVE_NEW_GUI
-   if ( use_gui )
-    {
-     mplResizeToMovieSize( sh_video->disp_w,sh_video->disp_h );
-     guiIntfStruct.MovieWidth=sh_video->disp_w;
-     guiIntfStruct.MovieHeight=sh_video->disp_h;
-     guiIntfStruct.StreamType=stream->type;
-     guiGetEvent( guiSetFileName,filename );
-     if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels;
-      else guiIntfStruct.AudioType=0;
-#ifdef USE_DVDREAD
-     if ( stream->type == STREAMTYPE_DVD ) guiGetEvent( guiSetDVD,(char *)stream->priv );
-#endif
-    }
-#endif
-
 current_module="init_vo_vaa";
 
    if(video_out->control(VOCTRL_QUERY_VAA, &vo_vaa)==VO_NOTIMPL)
@@ -1327,6 +1312,20 @@
 
 fflush(stdout);
 
+#ifdef HAVE_NEW_GUI
+   if ( use_gui )
+    {
+     guiGetEvent( guiSetShVideo,(char *)sh_video );
+     guiGetEvent( guiSetFileName,filename );
+     guiIntfStruct.StreamType=stream->type;
+     if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0;
+     if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,1 ); else guiGetEvent( guiSetAudioOnly,0 );
+#ifdef USE_DVDREAD
+     if ( stream->type == STREAMTYPE_DVD ) guiGetEvent( guiSetDVD,(char *)stream->priv );
+#endif
+    }
+#endif
+
 {
 //int frame_corr_num=0;   //
 //float v_frame=0;    // Video
@@ -2734,6 +2733,7 @@
 
 #ifdef HAVE_NEW_GUI
       if(use_gui){
+        guiEventHandling();
 	if(demuxer->file_format==DEMUXER_TYPE_AVI && sh_video->video.dwLength>2){
 	  // get pos from frame number / total frames
 	  guiIntfStruct.Position=(float)d_video->pack_no*100.0f/sh_video->video.dwLength;




More information about the MPlayer-cvslog mailing list