Commit e021989e authored by Zoran Turalija's avatar Zoran Turalija Committed by Jean-Baptiste Kempf

hotkeys: Bookmark subtitle timestamp only if it exists and is enabled.

In ACTIONID_SUBSYNC_MARKSUB, do not bookmark subtitle timestamp if
there is no subtitle, or if subtitle has been currently disabled.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5d21b42d
......@@ -389,11 +389,27 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
break;
}
case ACTIONID_SUBSYNC_MARKSUB:
if( p_input )
{
p_sys->subtitle_delaybookmarks.i_time_subtitle = mdate();
DisplayMessage( p_vout, _("Sub sync: bookmarked subtitle timestamp"));
vlc_value_t val, list, list2;
int i_count;
var_Get( p_input, "spu-es", &val );
var_Change( p_input, "spu-es", VLC_VAR_GETCHOICES,
&list, &list2 );
i_count = list.p_list->i_count;
if( i_count < 1 || val.i_int < 0 )
{
DisplayMessage( p_vout, _("Sub sync: No active subtitle") );
var_FreeList( &list, &list2 );
break;
}
p_sys->subtitle_delaybookmarks.i_time_subtitle = mdate();
DisplayMessage( p_vout,
_("Sub sync: bookmarked subtitle timestamp"));
var_FreeList( &list, &list2 );
}
break;
case ACTIONID_SUBSYNC_APPLY:
{
/* Warning! Can yield a pause in the playback.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment