<html><head></head><body>This function cannot fail, because it has no provisions for returning an error. So you have two options: remove it or keep it working.<br><br>But returning a potentially incorrect result is just wrong.<br><br><div class="gmail_quote">Le 15 mai 2019 12:53:13 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">This function is meaningless on the new player.<hr> include/vlc/deprecated.h | 11 +++++++++++<br> include/vlc/libvlc_media_player.h | 10 ----------<br> lib/media_player.c | 11 ++---------<br> 3 files changed, 13 insertions(+), 19 deletions(-)<br><br>diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h<br>index 6f433654b4..420ac354cf 100644<br>--- a/include/vlc/deprecated.h<br>+++ b/include/vlc/deprecated.h<br>@@ -111,6 +111,17 @@ LIBVLC_DEPRECATED LIBVLC_API int<br> LIBVLC_DEPRECATED LIBVLC_API<br> void libvlc_playlist_play( libvlc_instance_t *p_instance );<br> <br>+/**<br>+ * Is the player able to play<br>+ *<br>+ * \param p_mi the Media Player<br>+ * \return boolean<br>+ *<br>+ * \libvlc_return_bool<br>+ */<br>+LIBVLC_DEPRECATED<br>+LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );<br>+<br> /** @}*/<br> <br> # ifdef __cplusplus<br>diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br>index f10fcf7a96..3fc0b6a644 100644<br>--- a/include/vlc/libvlc_media_player.h<br>+++ b/include/vlc/libvlc_media_player.h<br>@@ -1173,16 +1173,6 @@ LIBVLC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *p_mi );<br> */<br> LIBVLC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi );<br> <br>-/**<br>- * Is the player able to play<br>- *<br>- * \param p_mi the Media Player<br>- * \return boolean<br>- *<br>- * \libvlc_return_bool<br>- */<br>-LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );<br>-<br> /**<br> * Get title chapter count<br> *<br>diff --git a/lib/media_player.c b/lib/media_player.c<br>index 72095b502e..7c7aa3cc50 100644<br>--- a/lib/media_player.c<br>+++ b/lib/media_player.c<br>@@ -1778,15 +1778,8 @@ void libvlc_media_player_previous_chapter( libvlc_media_player_t *p_mi )<br> <br> int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )<br> {<br>- input_thread_t *p_input_thread =<br>- libvlc_get_input_thread ( p_mi );<br>- if ( !p_input_thread )<br>- return false;<br>-<br>- int state = var_GetInteger( p_input_thread, "state" );<br>- input_Release(p_input_thread);<br>-<br>- return state != END_S && state != ERROR_S;<br>+ (void) p_mi;<br>+ return true;<br> }<br> <br> int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>