[vlc-devel] [PATCH] libvlc: check if we are in the proper state before to send libvlc_MediaPlayerStopped
Pierre d'Herbemont
pdherbemont at free.fr
Tue Apr 1 18:53:34 CEST 2008
On Apr 1, 2008, at 6:51 PM, Tanguy Krotoff wrote:
> On Tue, Apr 1, 2008 at 6:42 PM, Pierre d'Herbemont <pdherbemont at free.fr
> > wrote:
>>
>> On Apr 1, 2008, at 4:24 PM, Tanguy Krotoff wrote:
>>> ---
>>> src/control/media_player.c | 25 +++++++++++++++----------
>>> 1 files changed, 15 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/src/control/media_player.c b/src/control/media_player.c
>>> index b59fafe..20faa24 100644
>>> --- a/src/control/media_player.c
>>> +++ b/src/control/media_player.c
>>> @@ -627,6 +627,13 @@ void
>>> libvlc_media_player_pause( libvlc_media_player_t *p_mi,
>>> void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
>>> libvlc_exception_t *p_e )
>>> {
>>> + input_thread_t * p_input_thread =
>>> libvlc_get_input_thread( p_mi, p_e );
>>> +
>>> + if( !p_input_thread )
>>> + return;
>>> +
>>> + int state = var_GetInteger( p_input_thread, "state" );
>>
>> What about using libvlc_media_player_get_state()?
>
> I don't know, other functions from media_player.c don't use
> libvlc_media_player_get_state().
> I wrote the code so it is similar to the rest
Ok. This must be old code (from libvlc_input) that needs cleanup.
Pierre.
More information about the vlc-devel
mailing list