[vlc-commits] filter_chain: set NULL on AppendFilter when value is implied by previous call

Steve Lhomme git at videolan.org
Thu Nov 14 08:29:39 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Nov  7 13:01:43 2019 +0100| [c854beb04714ccf558ecf14ee58cb83e553b6eed] | committer: Steve Lhomme

filter_chain: set NULL on AppendFilter when value is implied by previous call

Either because Reset() set the same input value or the we're using the same
value set by the previous AppendXXX().

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

 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 0af67eefab..82112577ff 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -327,13 +327,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 1ae85a0213..9f4bd9f438 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);



More information about the vlc-commits mailing list