[MPlayer-cvslog] r38519 - trunk/gui/dialog/preferences.c

ib subversion at mplayerhq.hu
Sun May 12 19:58:06 EEST 2024


Author: ib
Date: Sun May 12 19:58:05 2024
New Revision: 38519

Log:
Fix selecting the wrong audio or video output driver.

If the user has specified a list of drivers when entering the GUI,
the first driver in the list must not be selected (and later written
to the configuration file).

Modified:
   trunk/gui/dialog/preferences.c

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Sun May 12 19:56:34 2024	(r38518)
+++ trunk/gui/dialog/preferences.c	Sun May 12 19:58:05 2024	(r38519)
@@ -1244,7 +1244,7 @@ void ShowPreferences( void )
       char * name = gstrdup( audio_driver_list[0] );
       char * sep = gstrchr( name,':' );
       if ( sep ) *sep=0;
-      if ( !gstrcmp( name,info->short_name ) ) old_audio_driver=c;
+      if ( !gstrcmp( name,info->short_name ) && !audio_driver_list[1] ) old_audio_driver=c;
       free( name );
      }
     c++;
@@ -1290,7 +1290,7 @@ void ShowPreferences( void )
   while ( video_out_drivers[i] )
    if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
     {
-     if ( video_driver_list && !gstrcmp( video_driver_list[0],video_out_drivers[i - 1]->info->short_name ) ) old_video_driver=c;
+     if ( video_driver_list && !gstrcmp( video_driver_list[0],video_out_drivers[i - 1]->info->short_name ) && !video_driver_list[1] ) old_video_driver=c;
      c++;
      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 );


More information about the MPlayer-cvslog mailing list