[MPlayer-cvslog] r34491 - in trunk/gui: interface.c ui/main.c

ib subversion at mplayerhq.hu
Mon Jan 2 17:48:18 CET 2012


Author: ib
Date: Mon Jan  2 17:48:18 2012
New Revision: 34491

Log:
Initialize device options in guiInit().

Don't do that just before playback starts.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/main.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Mon Jan  2 17:25:00 2012	(r34490)
+++ trunk/gui/interface.c	Mon Jan  2 17:48:18 2012	(r34491)
@@ -71,6 +71,11 @@ void guiInit(void)
 
     mp_msg(MSGT_GPLAYER, MSGL_V, "GUI init.\n");
 
+    if (!cdrom_device)
+        cdrom_device = strdup(DEFAULT_CDROM_DEVICE);
+    if (!dvd_device)
+        dvd_device = strdup(DEFAULT_DVD_DEVICE);
+
 #ifdef CONFIG_DXR3
     if (!gtkDXR3Device)
         gtkDXR3Device = strdup("/dev/em8300-0");

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Mon Jan  2 17:25:00 2012	(r34490)
+++ trunk/gui/ui/main.c	Mon Jan  2 17:48:18 2012	(r34491)
@@ -213,7 +213,6 @@ play:
 #ifdef CONFIG_CDDA
           case STREAMTYPE_CDDA:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
-	       if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
@@ -225,7 +224,6 @@ play:
 #ifdef CONFIG_VCD
           case STREAMTYPE_VCD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_VCD - CLEAR_FILE );
-	       if ( !cdrom_device ) cdrom_device=gstrdup( DEFAULT_CDROM_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
 		 if ( !guiInfo.Track )
@@ -237,7 +235,6 @@ play:
 #ifdef CONFIG_DVDREAD
           case STREAMTYPE_DVD:
 	       guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD - CLEAR_FILE );
-	       if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE );
 	       if ( guiInfo.Playing != GUI_PAUSE )
 	        {
                  guiInfo.NewPlay=GUI_FILE_SAME;


More information about the MPlayer-cvslog mailing list