[MPlayer-cvslog] r38514 - in trunk/gui: dialog/preferences.c interface.c

ib subversion at mplayerhq.hu
Sun May 12 19:46:54 EEST 2024


Author: ib
Date: Sun May 12 19:46:54 2024
New Revision: 38514

Log:
Don't implicitly set a GUI supporting video output driver.

On GUI_PREPARE, don't set the first GUI supporting video output driver
as default if none has been specified. Let MPlayer choose the best one.

When closing the preferences, don't (implicitly) set the first GUI
supporting video output driver as default unless the user has explicitly
selected it.

In addition, and for the moment, disable the fatal VideoOutError that
terminates the program.

This fixes https://bugs.launchpad.net/ubuntu/+source/mplayer/+bug/65165
and https://bugs.debian.org/576591 and closes Trac #1044.

Modified:
   trunk/gui/dialog/preferences.c
   trunk/gui/interface.c

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Sun May 12 19:43:23 2024	(r38513)
+++ trunk/gui/dialog/preferences.c	Sun May 12 19:46:54 2024	(r38514)
@@ -1273,7 +1273,7 @@ void ShowPreferences( void )
  {
   int i = 0, c = 0;
   char * tmp[3]; tmp[2]="";
-  old_video_driver=0;
+  old_video_driver = -1;
   if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) );
   while ( video_out_drivers[i] )
    if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
@@ -1283,6 +1283,7 @@ void ShowPreferences( void )
      tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name;
      gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp );
     }
+  vo_driver[0] = NULL;
   gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 );
   gtk_clist_get_text( GTK_CLIST( CLVDrivers ),old_video_driver,0,(char **)&vo_driver );
   gtk_widget_set_sensitive( VConfig,FALSE );

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sun May 12 19:43:23 2024	(r38513)
+++ trunk/gui/interface.c	Sun May 12 19:46:54 2024	(r38514)
@@ -643,18 +643,7 @@ int gui(int what, void *data)
 
         /* video opts */
 
-        if (!video_driver_list) {
-            int i = 0;
-
-            while (video_out_drivers[i++]) {
-                if (video_out_drivers[i - 1]->control(VOCTRL_GUISUPPORT, NULL) == VO_TRUE) {
-                    listSet(&video_driver_list, video_out_drivers[i - 1]->info->short_name);
-                    break;
-                }
-            }
-        }
-
-        if (!video_driver_list && !video_driver_list[0]) {
+        if (0) {
             gmp_msg(MSGT_GPLAYER, MSGL_FATAL, _(MSGTR_GUI_MSG_VideoOutError));
             mplayer(MPLAYER_EXIT_GUI, EXIT_ERROR, 0);
         }


More information about the MPlayer-cvslog mailing list