mirror of
https://github.com/mpv-player/mpv
synced 2025-04-29 06:42:55 +00:00
Do not set vo_sub to NULL on changing subtitles, update_subtitles
will do this when called with reset == 1. Fixes subtitles getting stuck when switching via 'j'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23857 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8211c24579
commit
06292ecdbf
@ -1289,7 +1289,6 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg,
|
|||||||
|
|
||||||
mpctx->set_of_sub_pos = -1;
|
mpctx->set_of_sub_pos = -1;
|
||||||
subdata = NULL;
|
subdata = NULL;
|
||||||
vo_sub_last = vo_sub = NULL;
|
|
||||||
|
|
||||||
vobsub_id = -1;
|
vobsub_id = -1;
|
||||||
dvdsub_id = -1;
|
dvdsub_id = -1;
|
||||||
@ -2376,9 +2375,6 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
|
|||||||
mpctx->set_of_sub_size = 0;
|
mpctx->set_of_sub_size = 0;
|
||||||
if (mpctx->set_of_sub_pos >= 0) {
|
if (mpctx->set_of_sub_pos >= 0) {
|
||||||
mpctx->global_sub_pos = -2;
|
mpctx->global_sub_pos = -2;
|
||||||
vo_sub_last = vo_sub = NULL;
|
|
||||||
vo_osd_changed(OSDTYPE_SUBTITLE);
|
|
||||||
vo_update_osd(sh_video->disp_w, sh_video->disp_h);
|
|
||||||
mp_input_queue_cmd(mp_input_parse_cmd("sub_select"));
|
mp_input_queue_cmd(mp_input_parse_cmd("sub_select"));
|
||||||
}
|
}
|
||||||
} else if (v < mpctx->set_of_sub_size) {
|
} else if (v < mpctx->set_of_sub_size) {
|
||||||
@ -2389,9 +2385,6 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd)
|
|||||||
sub_free(subd);
|
sub_free(subd);
|
||||||
if (mpctx->set_of_sub_pos == v) {
|
if (mpctx->set_of_sub_pos == v) {
|
||||||
mpctx->global_sub_pos = -2;
|
mpctx->global_sub_pos = -2;
|
||||||
vo_sub_last = vo_sub = NULL;
|
|
||||||
vo_osd_changed(OSDTYPE_SUBTITLE);
|
|
||||||
vo_update_osd(sh_video->disp_w, sh_video->disp_h);
|
|
||||||
mp_input_queue_cmd(mp_input_parse_cmd("sub_select"));
|
mp_input_queue_cmd(mp_input_parse_cmd("sub_select"));
|
||||||
} else if (mpctx->set_of_sub_pos > v) {
|
} else if (mpctx->set_of_sub_pos > v) {
|
||||||
--mpctx->set_of_sub_pos;
|
--mpctx->set_of_sub_pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user