Commit 93d260e6 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf Committed by Felix Paul Kühne
Browse files

VLCMediaPlayer: send Ended event when libvlc_MediaPlayerEndReached

Instead of using VLCMediaPlayerStateStopped

Close #32

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent f8779f5d
......@@ -128,7 +128,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
newState = VLCMediaPlayerStatePlaying;
else if (event->type == libvlc_MediaPlayerPaused)
newState = VLCMediaPlayerStatePaused;
else if (event->type == libvlc_MediaPlayerEndReached || event->type == libvlc_MediaPlayerStopped)
else if (event->type == libvlc_MediaPlayerStopped)
newState = VLCMediaPlayerStateStopped;
else if (event->type == libvlc_MediaPlayerEncounteredError)
newState = VLCMediaPlayerStateError;
......@@ -136,6 +136,8 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
newState = VLCMediaPlayerStateBuffering;
else if (event->type == libvlc_MediaPlayerOpening)
newState = VLCMediaPlayerStateOpening;
else if (event->type == libvlc_MediaPlayerEndReached)
newState = VLCMediaPlayerStateEnded;
else {
VKLog(@"%s: Unknown event", __FUNCTION__);
return;
......
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