+ case INPUT_GET_SUBDELAY:
+ pi = (int)va_arg( args, int *);
+ /* We work on the first subtitle */
+ if( p_input->p_sys != NULL )
+ {
+ if( p_input->p_sys->i_sub > 0 )
+ {
+ i_ret = var_Get( (vlc_object_t *)p_input->p_sys->sub[0],
+ "sub-delay", &val );
+ *pi = val.i_int;
+ }
+ else
+ {
+ msg_Dbg( p_input,"no subtitle track");
+ i_ret = VLC_EGENERIC;
+ }
+ }
+ else
+ {
+ i_ret = VLC_EGENERIC;
+ }
+ break;
+
+ case INPUT_SET_SUBDELAY:
+ i = (int)va_arg( args, int );
+ /* We work on the first subtitle */
+ if( p_input->p_sys )
+ {
+ if( p_input->p_sys->i_sub > 0 )
+ {
+ val.i_int = i;
+ i_ret = var_Set( (vlc_object_t *)p_input->p_sys->sub[0],
+ "sub-delay", val );
+ }
+ else
+ {
+ msg_Dbg( p_input,"no subtitle track");
+ i_ret = VLC_EGENERIC;
+ }
+ }
+ else
+ {
+ i_ret = VLC_EGENERIC;
+ }
+ break;
+