[MPlayer-cvslog] r34155 - in trunk/gui/ui: gtk/url.c main.c

ib subversion at mplayerhq.hu
Thu Sep 29 15:44:21 CEST 2011


Author: ib
Date: Thu Sep 29 15:44:21 2011
New Revision: 34155

Log:
Set an URL guiInfo.Filename by using uiSetFileName().

Because the evPlayNetwork code in uiEventHandling() is already performed
in uiSetFileName(), it may be omitted and evPlay may be called directly.

Modified:
   trunk/gui/ui/gtk/url.c
   trunk/gui/ui/main.c

Modified: trunk/gui/ui/gtk/url.c
==============================================================================
--- trunk/gui/ui/gtk/url.c	Thu Sep 29 15:36:25 2011	(r34154)
+++ trunk/gui/ui/gtk/url.c	Thu Sep 29 15:44:21 2011	(r34155)
@@ -103,8 +103,8 @@ static void on_Button_pressed( GtkButton
      item->url=gstrdup( str );
      listSet( gtkAddURLItem,item );
 
-     setdup( &guiInfo.Filename,str ); guiInfo.NewPlay=GUI_FILE_NEW;
-     uiEventHandling( evPlayNetwork,0 );
+     uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW;
+     uiEventHandling( evPlay,0 );
     }
   }
  HideURLDialogBox();

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Thu Sep 29 15:36:25 2011	(r34154)
+++ trunk/gui/ui/main.c	Thu Sep 29 15:44:21 2011	(r34155)
@@ -143,11 +143,6 @@ void uiEventHandling( int msg,float para
         mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 );
         break;
 
-   case evPlayNetwork:
-        nfree( guiInfo.SubtitleFilename );
-	nfree( guiInfo.AudioFilename );
-	guiInfo.StreamType=STREAMTYPE_STREAM;
-        goto play;
    case evSetURL:
         gtkShow( evPlayNetwork,NULL );
 	break;


More information about the MPlayer-cvslog mailing list