[vlc-commits] chroma: chain: fix usage of 1 iteration in filters

Thomas Guillem git at videolan.org
Mon Mar 19 12:15:36 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Mar 15 08:11:05 2018 +0100| [add99ee7e26c109b2d48ccdca1164234717407d0] | committer: Thomas Guillem

chroma: chain: fix usage of 1 iteration in filters

(cherry picked from commit 19f06612e29ce5bc8481bc83b04518206ad96e28)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 modules/video_chroma/chain.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index ace70439b8..cc8b0c3496 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -223,15 +223,14 @@ static int ActivateFilter( vlc_object_t *p_this )
     if( !p_filter->b_allow_fmt_out_change || p_filter->psz_name == NULL )
         return VLC_EGENERIC;
 
-    /* Force only one level of iteration when using the chain converter from a
-     * filter. */
-    if( var_InheritInteger( p_filter, "chain-level" ) > 0 )
+    if( var_Type( p_filter->obj.parent, "chain-filter-level" ) != 0 )
         return VLC_EGENERIC;
-    var_Create( p_filter, "chain-level", VLC_VAR_INTEGER );
-    var_SetInteger( p_filter, "chain-level", CHAIN_LEVEL_MAX - 1 );
 
-    /* Try to add a converter before the requested filter */
-    return Activate( p_filter, BuildFilterChain );
+    var_Create( p_filter, "chain-filter-level", VLC_VAR_INTEGER );
+    int i_ret = Activate( p_filter, BuildFilterChain );
+    var_Destroy( p_filter, "chain-filter-level" );
+
+    return i_ret;
 }
 
 static void Destroy( vlc_object_t *p_this )



More information about the vlc-commits mailing list