[vlc-devel] [PATCH 15/34] filter_chain: set NULL on AppendFilter when value is implied by previous call

Steve Lhomme robux4 at ycbcr.xyz
Fri Nov 8 15:40:19 CET 2019


Either because Reset() set the same input value or the we're using the same
value set by the previous AppendXXX().
---
 modules/stream_out/transcode/video.c | 4 ++--
 modules/video_chroma/chain.c         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 08a1a71e080..6891e2b49c1 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -338,13 +338,13 @@ static int transcode_video_filters_init( sout_stream_t *p_stream,
         filter_chain_AppendFilter( id->p_f_chain,
                                    p_cfg->video.psz_deinterlace,
                                    p_cfg->video.p_deinterlace_cfg,
-                                   p_src, p_src );
+                                   NULL, p_src );
         p_src = filter_chain_GetFmtOut( id->p_f_chain );
     }
 
     if( b_master_sync )
     {
-        filter_chain_AppendFilter( id->p_f_chain, "fps", NULL, p_src, p_dst );
+        filter_chain_AppendFilter( id->p_f_chain, "fps", NULL, NULL, p_dst );
         p_src = filter_chain_GetFmtOut( id->p_f_chain );
     }
 
diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index 1ae85a02131..9f4bd9f4387 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -395,7 +395,7 @@ static int BuildFilterChain( filter_t *p_filter )
             p_sys->p_video_filter =
                 filter_chain_AppendFilter( p_sys->p_chain,
                                            p_filter->psz_name, p_filter->p_cfg,
-                                           &fmt_mid, &fmt_mid );
+                                           NULL, &fmt_mid );
             if( p_sys->p_video_filter )
             {
                 filter_AddProxyCallbacks( p_filter,
@@ -532,7 +532,7 @@ static filter_t * AppendTransform( filter_chain_t *p_chain, const es_format_t *p
     snprintf( config, 100, "transform{type=%s}", type );
     char *next = config_ChainCreate( &name, &cfg, config );
 
-    filter_t *p_filter = filter_chain_AppendFilter( p_chain, name, cfg, p_fmt1, p_fmt2 );
+    filter_t *p_filter = filter_chain_AppendFilter( p_chain, name, cfg, NULL, p_fmt2 );
 
     config_ChainDestroy(cfg);
     free(name);
-- 
2.17.1



More information about the vlc-devel mailing list