[vlc-devel] Bug in libvlc for State Changes in Input Control & Media Instance

Laurent Aimar fenrir at via.ecp.fr
Mon Oct 1 00:22:11 CEST 2007


On Sun, Sep 30, 2007, Enrique Osuna wrote:
> 1) Functions libvlc_media_instance_play & libvlc_media_instance_pause
> (src/control/media_instance.c) used input_Control( p_input_thread,
> INPUT_CONTROL_SET_STATE, PLAYING_S or PAUSE_S ).  This caused the
> video feed to be repositioned to the beginning (it kept forcing the
> PositionCallback to be called).

> 
> I figured that input_ChangeState( p_input_thread, PLAYING_S or PAUSE_S
> ) was a better option.
 The function input_ChangeState is an internal function to src/input/* ONLY.
You cannot call it from src/control/*

> 2) Function input_ChangeState (src/input/input_internal.h) was setting
> the p_input's state without letting the Control (src/input/input.c) to
> catch the changes.
 It is on purpose, it can only be called from src/input/input.c when we do NOT
want to launch the callback.

 In fact, the problem is that media_instance.c use INPUT_CONTROL_SET_STATE
instead of INPUT_SET_STATE.
 I have commited the right fix. Could you verify if it works ?

-- 
fenrir




More information about the vlc-devel mailing list