<html><head></head><body><div class="gmail_quote">Le 14 août 2017 12:05:14 GMT+03:00, Valentin Deniaud <valentin.deniaud@inpt.fr> 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">Apply patch from #12884<br />---<br /> include/vlc/libvlc_media_player.h | 7 +++++++<br /> lib/video.c                       | 8 ++++++++<br /> 2 files changed, 15 insertions(+)<br /><br />diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br />index 78caed03ff..abd62b428e 100644<br />--- a/include/vlc/libvlc_media_player.h<br />+++ b/include/vlc/libvlc_media_player.h<br />@@ -1424,6 +1424,13 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,<br /> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br />                                                   const char *psz_mode );<br /> <br />+/**<br />+ * Get deinterlace filter mode<br />+ *<br />+ * \param p_mi libvlc media player<br />+ */<br />+LIBVLC_API char* libvlc_video_get_deinterlace( libvlc_media_player_t *p_mi );<br />+<br /> /**<br />  * Get an integer marquee option value<br />  *<br />diff --git a/lib/video.c b/lib/video.c<br />index f6e16ba601..c552573f88 100644<br />--- a/lib/video.c<br />+++ b/lib/video.c<br />@@ -697,6 +697,14 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br />     free (pp_vouts);<br /> }<br /> <br />+/******************************************************************************<br />+ * libvlc_video_get_deinterlace : get deinterlace mode<br />+ *****************************************************************************/<br />+char *libvlc_video_get_deinterlace( libvlc_media_player_t *p_mi)<br />+{<br />+        return var_GetString ( p_mi, "deinterlace-mode");<br />+}<br />+<br /> /* ************** */<br /> /* module helpers */<br /> /* ************** */</pre></blockquote></div><br clear="all">How does the caller know the meaning of the returned value? How does it differentiate memory error from no value?<br>
<br>
Bad API design IMO...<br>
-- <br>
Rémi Denis-Courmont<br>
Typed on an inconvenient virtual keyboard</body></html>