[MPlayer-cvslog] CVS: main/Gui/mplayer mw.c,1.119,1.120

Guillaume Poirier CVS syncmail at mplayerhq.hu
Sat Apr 22 15:24:23 CEST 2006


CVS change done by Guillaume Poirier CVS

Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mail:/var2/tmp/cvs-serv28786/Gui/mplayer

Modified Files:
	mw.c 
Log Message:
simpler and better subtitles switching, patch by Stanislav Maslovski <stanislav P maslovski A gmail P com>


Index: mw.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- mw.c	16 Apr 2006 16:58:36 -0000	1.119
+++ mw.c	22 Apr 2006 13:24:20 -0000	1.120
@@ -25,6 +25,8 @@
 #include "../libmpdemux/demuxer.h"
 #include "../libmpdemux/stheader.h"
 #include "../codec-cfg.h"
+#include "../m_option.h"
+#include "../m_property.h"
 
 #define GUI_REDRAW_WAIT 375
 
@@ -32,12 +34,6 @@
 #include "widgets.h"
 
 extern mixer_t mixer; // mixer from mplayer.c
-extern int global_sub_size;
-extern int global_sub_pos;
-extern int global_sub_indices[];
-extern int sub_source(void);
-#define SUB_SOURCE_VOBSUB 1
-#define SUB_SOURCE_DEMUX  2
 
 extern unsigned int GetTimerMS( void );
 
@@ -117,22 +113,8 @@
 	goto play;
 
    case evSetSubtitle:
-	if ( !guiIntfStruct.demuxer || global_sub_pos == iparam ) break;
-	global_sub_pos = iparam;
-	if ( global_sub_pos >= 0 )
-	 switch ( sub_source() )
-	  {
-	   case SUB_SOURCE_VOBSUB:
-		vobsub_id = global_sub_pos - global_sub_indices[SUB_SOURCE_VOBSUB];
-		goto play;
-	   case SUB_SOURCE_DEMUX:
-		vobsub_id = -1;
-		dvdsub_id = global_sub_pos - global_sub_indices[SUB_SOURCE_DEMUX];
-		goto play;
-	  }
-	vobsub_id = -1;
-	dvdsub_id = -2;
-	goto play;
+	mp_property_do("sub",M_PROPERTY_SET,&iparam); 
+	break;
 
 #ifdef HAVE_VCD
    case evSetVCDTrack:




More information about the MPlayer-cvslog mailing list