[vlc-devel] [PATCH 13/19] filter_chain: no need to reset the fmt_out each time a filter is added

Steve Lhomme robux4 at ycbcr.xyz
Tue Nov 5 16:18:40 CET 2019


The last output format is always the format of the last filter. It doesn't
matter if it was allowed to change the format or not. It's either the filter
added or the "chain" filter added to compensate for the format change (should
be adjusted in push mode)

If there's no filter yet, the output format is the one used to initialize the
filter chain.
---
 src/misc/filter_chain.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 3739a457200..42be5ac654b 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -236,12 +236,6 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
     if( filter->p_module == NULL )
         goto error;
 
-    if( chain->b_allow_fmt_out_change )
-    {
-        es_format_Clean( &chain->fmt_out );
-        es_format_Copy( &chain->fmt_out, &filter->fmt_out );
-    }
-
     if( chain->last == NULL )
     {
         assert( chain->first == NULL );
@@ -389,9 +383,6 @@ bool filter_chain_IsEmpty(const filter_chain_t *chain)
 
 const es_format_t *filter_chain_GetFmtOut( const filter_chain_t *p_chain )
 {
-    if( p_chain->b_allow_fmt_out_change )
-        return &p_chain->fmt_out;
-
     if( p_chain->last != NULL )
         return &p_chain->last->filter.fmt_out;
 
-- 
2.17.1



More information about the vlc-devel mailing list