[vlc-devel] [PATCH 10/11] playlist: engine: RateCallback: refactor

Filip Roséen filip at atch.se
Thu May 18 12:01:17 CEST 2017


---
 src/playlist/engine.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 3fbf9dad41..fce5d6879e 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -110,13 +110,9 @@ static int RateCallback( vlc_object_t *p_this, char const *psz_cmd,
 
     PL_LOCK;
 
-    if( pl_priv(p_playlist)->p_input == NULL )
-    {
-        PL_UNLOCK;
-        return VLC_SUCCESS;
-    }
+    if( pl_priv(p_playlist)->p_input )
+        var_SetFloat( pl_priv( p_playlist )->p_input, "rate", newval.f_float );
 
-    var_SetFloat( pl_priv( p_playlist )->p_input, "rate", newval.f_float );
     PL_UNLOCK;
     return VLC_SUCCESS;
 }
-- 
2.12.2


More information about the vlc-devel mailing list