[vlc-commits] filter_chain: revector filter append

Rémi Denis-Courmont git at videolan.org
Mon Dec 12 19:53:40 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 12 19:45:56 2016 +0200| [da9ae5d620989b677a7092c79e7020dca9f4b1c5] | committer: Rémi Denis-Courmont

filter_chain: revector filter append

(no functional changes)

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

 src/misc/filter_chain.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 6def304..cff4593 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -175,10 +175,9 @@ void filter_chain_Reset( filter_chain_t *p_chain, const es_format_t *p_fmt_in,
     }
 }
 
-filter_t *filter_chain_AppendFilter( filter_chain_t *chain, const char *name,
-                                     config_chain_t *cfg,
-                                     const es_format_t *fmt_in,
-                                     const es_format_t *fmt_out )
+static filter_t *filter_chain_AppendInner( filter_chain_t *chain,
+    const char *name, const char *capability, config_chain_t *cfg,
+    const es_format_t *fmt_in, const es_format_t *fmt_out )
 {
     vlc_object_t *parent = chain->callbacks.sys;
     chained_filter_t *chained =
@@ -207,8 +206,7 @@ filter_t *filter_chain_AppendFilter( filter_chain_t *chain, const char *name,
     filter->owner = chain->callbacks;
     filter->owner.sys = chain;
 
-    filter->p_module = module_need( filter, chain->filter_cap, name,
-                                    name != NULL );
+    filter->p_module = module_need( filter, capability, name, name != NULL );
     if( filter->p_module == NULL )
         goto error;
 
@@ -253,6 +251,14 @@ error:
     return NULL;
 }
 
+filter_t *filter_chain_AppendFilter( filter_chain_t *chain,
+    const char *name, config_chain_t *cfg,
+    const es_format_t *fmt_in, const es_format_t *fmt_out )
+{
+    return filter_chain_AppendInner( chain, name, chain->filter_cap, cfg,
+                                     fmt_in, fmt_out );
+}
+
 void filter_chain_DeleteFilter( filter_chain_t *chain, filter_t *filter )
 {
     vlc_object_t *obj = chain->callbacks.sys;



More information about the vlc-commits mailing list