[vlc-commits] libvlc: simplify set_deinterlace

Thomas Guillem git at videolan.org
Wed May 9 09:39:53 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed May  9 09:37:35 2018 +0200| [511cdf1f691657f37a3c76f7770e690d06b157bd] | committer: Thomas Guillem

libvlc: simplify set_deinterlace

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=511cdf1f691657f37a3c76f7770e690d06b157bd
---

 lib/video.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/lib/video.c b/lib/video.c
index 53b5de49db..3071b14157 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -600,10 +600,7 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,
     if (deinterlace != 0 && deinterlace != 1)
         deinterlace = -1;
 
-    if (psz_mode == NULL)
-        psz_mode = "";
-
-    if (*psz_mode
+    if (psz_mode
      && strcmp (psz_mode, "blend")    && strcmp (psz_mode, "bob")
      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")
      && strcmp (psz_mode, "mean")     && strcmp (psz_mode, "x")
@@ -612,7 +609,7 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,
      && strcmp (psz_mode, "auto"))
         return;
 
-    if (*psz_mode && deinterlace != 0)
+    if (psz_mode && deinterlace != 0)
         var_SetString (p_mi, "deinterlace-mode", psz_mode);
 
     var_SetInteger (p_mi, "deinterlace", deinterlace);
@@ -623,7 +620,7 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,
     {
         vout_thread_t *p_vout = pp_vouts[i];
 
-        if (*psz_mode && deinterlace != 0)
+        if (psz_mode && deinterlace != 0)
             var_SetString (p_vout, "deinterlace-mode", psz_mode);
 
         var_SetInteger (p_vout, "deinterlace", deinterlace);



More information about the vlc-commits mailing list