Mercurial > mplayer.hg
changeset 18185:34cc93e9848f
simpler and better subtitles switching, patch by Stanislav Maslovski <stanislav P maslovski A gmail P com>
author | gpoirier |
---|---|
date | Sat, 22 Apr 2006 13:24:20 +0000 |
parents | aefee7b47602 |
children | fa216057a29f |
files | Gui/mplayer/mw.c |
diffstat | 1 files changed, 4 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/mw.c Sat Apr 22 13:24:04 2006 +0000 +++ b/Gui/mplayer/mw.c Sat Apr 22 13:24:20 2006 +0000 @@ -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: