[vlc-devel] [PATCH 2/2] hotkeys: When no audio is active, inform user timestamp is based on video.
Zoran Turalija
zoran.turalija at gmail.com
Tue Apr 16 13:17:36 CEST 2013
In ACTIONID_SUBSYNC_MARKAUDIO, if there is no audio track, or if
audio track has been disabled, correctly inform user that timestamp
has been bookmarked based on video track rather then audio track.
---
modules/control/hotkeys.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index c15e309..902dbd3 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -383,11 +383,23 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
break;
case ACTIONID_SUBSYNC_MARKAUDIO:
- {
- p_sys->subtitle_delaybookmarks.i_time_audio = mdate();
- DisplayMessage( p_vout, _("Sub sync: bookmarked audio timestamp"));
+ if( p_input )
+ {
+ vlc_value_t val, list, list2;
+ int i_count;
+ var_Get( p_input, "audio-es", &val );
+
+ var_Change( p_input, "audio-es", VLC_VAR_GETCHOICES,
+ &list, &list2 );
+ i_count = list.p_list->i_count;
+ p_sys->subtitle_delaybookmarks.i_time_audio = mdate();
+ DisplayMessage( p_vout, _("Sub sync: bookamarked %s timestamp"),
+ vlc_gettext( ( i_count < 1 || val.i_int < 0 )
+ ? N_("video") : N_("audio") ) );
+
+ var_FreeList( &list, &list2 );
+ }
break;
- }
case ACTIONID_SUBSYNC_MARKSUB:
if( p_input )
{
--
1.7.10.4
--
Kind regards,
Zoran Turalija
More information about the vlc-devel
mailing list