[vlc-commits] filter_chain: clarify how allowing output format chain works

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


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Aug  2 08:27:56 2019 +0200| [12935f8a3612f12a52000e822efa8040e3cb42b3] | committer: Steve Lhomme

filter_chain: clarify how allowing output format chain works

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.

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

 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 de2b713dfc..3739a45720 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 );



More information about the vlc-commits mailing list