From 511cdf1f691657f37a3c76f7770e690d06b157bd Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Wed, 9 May 2018 09:37:35 +0200 Subject: [PATCH] libvlc: simplify set_deinterlace --- 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); -- 2.11.4.GIT