Mercurial > mplayer.hg
comparison mplayer.c @ 17732:4a8c4d03c88c
restored the ability to disable subtitles when cycling with slave command 'sub_select' (previously broken in release 1.900)
author | nicodvb |
---|---|
date | Sun, 05 Mar 2006 08:55:08 +0000 |
parents | 9e1fb2aeeed9 |
children | 633f3d0a621b |
comparison
equal
deleted
inserted
replaced
17731:a3dd033ec92e | 17732:4a8c4d03c88c |
---|---|
3781 #endif | 3781 #endif |
3782 } break; | 3782 } break; |
3783 case MP_CMD_SUB_SELECT: | 3783 case MP_CMD_SUB_SELECT: |
3784 if (global_sub_size) { | 3784 if (global_sub_size) { |
3785 int source = -1; | 3785 int source = -1; |
3786 int reset=0; | |
3786 int v = cmd->args[0].v.i; | 3787 int v = cmd->args[0].v.i; |
3787 | 3788 |
3788 if (v < -1) | 3789 if (v < -1) |
3789 global_sub_pos++; | 3790 global_sub_pos++; |
3790 else | 3791 else |
3791 global_sub_pos = v; | 3792 global_sub_pos = v; |
3793 if(global_sub_pos == global_sub_size) | |
3794 reset = 1; | |
3792 if (global_sub_pos >= global_sub_size) | 3795 if (global_sub_pos >= global_sub_size) |
3793 global_sub_pos = -1; | 3796 global_sub_pos = -1; |
3794 if (global_sub_pos >= 0) | 3797 if (global_sub_pos >= 0) |
3795 source = sub_source(); | 3798 source = sub_source(); |
3796 | 3799 |
3803 set_of_sub_pos = -1; | 3806 set_of_sub_pos = -1; |
3804 subdata = NULL; | 3807 subdata = NULL; |
3805 vo_sub_last = vo_sub = NULL; | 3808 vo_sub_last = vo_sub = NULL; |
3806 #endif | 3809 #endif |
3807 vobsub_id = -1; | 3810 vobsub_id = -1; |
3808 if(dvdsub_lang) { | 3811 if(dvdsub_lang || reset) { |
3809 dvdsub_id = -1; | 3812 dvdsub_id = -1; |
3810 if (d_dvdsub) d_dvdsub->id = -1; | 3813 if (d_dvdsub) d_dvdsub->id = -1; |
3811 } | 3814 } |
3812 | 3815 |
3813 // be careful! | 3816 // be careful! |
3870 } | 3873 } |
3871 #endif | 3874 #endif |
3872 } | 3875 } |
3873 if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps; | 3876 if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps; |
3874 } else { // off | 3877 } else { // off |
3878 #ifdef USE_DVDREAD | |
3879 if (vo_spudec && stream->type == STREAMTYPE_DVD && dvdsub_id < 0) { | |
3880 dvdsub_id = -2; | |
3881 d_dvdsub->id = dvdsub_id; | |
3882 spudec_reset(vo_spudec); | |
3883 } | |
3884 #endif | |
3875 if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps; | 3885 if (!global_sub_quiet_osd_hack) osd_show_vobsub_changed = sh_video->fps; |
3876 #ifdef USE_SUB | 3886 #ifdef USE_SUB |
3877 vo_osd_changed(OSDTYPE_SUBTITLE); | 3887 vo_osd_changed(OSDTYPE_SUBTITLE); |
3878 #endif | 3888 #endif |
3879 } | 3889 } |