Commit 7f4c8080 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

media_instance.c: Fix the position callback to retun the time. (Next time,...

media_instance.c: Fix the position callback to retun the time. (Next time, we'll fix it to return the position).
parent 35b6342c
...@@ -174,16 +174,17 @@ input_position_changed( vlc_object_t * p_this, char const * psz_cmd, ...@@ -174,16 +174,17 @@ input_position_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_instance_t * p_mi = p_userdata; libvlc_media_instance_t * p_mi = p_userdata;
vlc_value_t val; vlc_value_t val;
if (!strcmp(psz_cmd, "intf" /* "-change" no need to go further */)) if (!strncmp(psz_cmd, "intf", 4 /* "-change" no need to go further */))
{ {
vlc_value_t val2;
input_thread_t * p_input = (input_thread_t *)p_this; input_thread_t * p_input = (input_thread_t *)p_this;
var_Get( p_input, "position", &val );
var_Get( p_input, "time", &val );
if ((val.i_time % I64C(500000)) != 0) if ((val.i_time % I64C(500000)) != 0)
return VLC_SUCCESS; /* No need to have a better precision */ return VLC_SUCCESS; /* No need to have a better precision */
var_Get( p_input, "state", &val );
if( val.i_int != PLAYING_S ) var_Get( p_input, "state", &val2 );
if( val2.i_int != PLAYING_S )
return VLC_SUCCESS; /* Don't send the position while stopped */ return VLC_SUCCESS; /* Don't send the position while stopped */
} }
else else
......
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