[vlc-devel] [PATCH 10/34] filter_chain: clarify how allowing output format chain works

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


The filter chain itself doesn't automatically adapt the output format to the
requested output format, which is good for push.

Use the local variable set on the whole chain rather than the value set on each
filter.
---
 src/misc/filter_chain.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index de2b713dfc5..3739a457200 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -52,7 +52,7 @@ struct filter_chain_t
 
     es_format_t fmt_in; /**< Chain input format (constant) */
     es_format_t fmt_out; /**< Chain current output format */
-    bool b_allow_fmt_out_change; /**< Can the output format be changed? */
+    bool b_allow_fmt_out_change; /**< Each filter can change the output */
     const char *filter_cap; /**< Filter modules capability */
     const char *conv_cap; /**< Converter modules capability */
 };
@@ -221,7 +221,7 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
         filter->owner.sub = NULL;
 
     assert( capability != NULL );
-    if( name != NULL && filter->b_allow_fmt_out_change )
+    if( name != NULL && chain->b_allow_fmt_out_change )
     {
         /* Append the "chain" video filter to the current list.
          * This filter will be used if the requested filter fails to load.
@@ -236,7 +236,7 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
     if( filter->p_module == NULL )
         goto error;
 
-    if( filter->b_allow_fmt_out_change )
+    if( chain->b_allow_fmt_out_change )
     {
         es_format_Clean( &chain->fmt_out );
         es_format_Copy( &chain->fmt_out, &filter->fmt_out );
-- 
2.17.1



More information about the vlc-devel mailing list