[vlc-commits] filter_chain: load "chain" video filter as a fallback

Thomas Guillem git at videolan.org
Thu Jun 1 13:25:32 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri May 26 15:57:14 2017 +0200| [6aa25676966d9da65ca929c18b4b021cbcf783c0] | committer: Jean-Baptiste Kempf

filter_chain: load "chain" video filter as a fallback

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 src/misc/filter_chain.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index a3b8a512b0..741a63c9ad 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -211,8 +211,18 @@ static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
     filter->owner.sys = chain;
 
     assert( capability != NULL );
+    if( name != NULL && filter->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.
+         * It will then try to add a video converter before. */
+        char name_chained[strlen(name) + sizeof(",chain")];
+        sprintf( name_chained, "%s,chain", name );
+        filter->p_module = module_need( filter, capability, name_chained, true );
+    }
+    else
+        filter->p_module = module_need( filter, capability, name, name != NULL );
 
-    filter->p_module = module_need( filter, capability, name, name != NULL );
     if( filter->p_module == NULL )
         goto error;
 



More information about the vlc-commits mailing list