<html><head></head><body>Hi,<br><br>Entropy-wise, it makes sense. But not stopped yet sounds more like a case for returning EAGAIN (vs 0) than true, IMO.<br><br><div class="gmail_quote">Le 15 mai 2019 12:53:15 GMT+03:00, Romain Vimont <rom1v@videolabs.io> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">From: Thomas Guillem <thomas@gllm.fr><hr> include/vlc_player.h | 4 +++-<br> src/input/player.c | 6 +++---<br> 2 files changed, 6 insertions(+), 4 deletions(-)<br><br>diff --git a/include/vlc_player.h b/include/vlc_player.h<br>index 054c4abae3..a7ad520bed 100644<br>--- a/include/vlc_player.h<br>+++ b/include/vlc_player.h<br>@@ -1206,8 +1206,10 @@ vlc_player_Start(vlc_player_t *player);<br> * STOPPED state event to know when the stop is finished.<br> *<br> * @param player locked player instance<br>+ * @return false if already stopped, true if the player is stopping<br>+ * asynchronously<br> */<br>-VLC_API void<br>+VLC_API bool<br> vlc_player_Stop(vlc_player_t *player);<br> <br> /**<br>diff --git a/src/input/player.c b/src/input/player.c<br>index e81c717f36..6796b07e07 100644<br>--- a/src/input/player.c<br>+++ b/src/input/player.c<br>@@ -2217,7 +2217,7 @@ vlc_player_Start(vlc_player_t *player)<br> return ret;<br> }<br> <br>-void<br>+bool<br> vlc_player_Stop(vlc_player_t *player)<br> {<br> struct vlc_player_input *input = vlc_player_get_input_locked(player);<br>@@ -2227,12 +2227,12 @@ vlc_player_Stop(vlc_player_t *player)<br> vlc_player_InvalidateNextMedia(player);<br> <br> if (!input || !player->started)<br>- return;<br>+ return false;<br> player->started = false;<br> <br> vlc_player_destructor_AddInput(player, input);<br> player->input = NULL;<br>-<br>+ return true;<br> }<br> <br> void</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>