[vlc-devel] [PATCH 09/10] [RFC] demux: allow default demux-filters

Steve Lhomme robux4 at videolabs.io
Tue May 31 13:15:36 CEST 2016


So users don't have to set demux-filter=cc_demux everytime they select a
Chromecast output.
The Chromecast demux_filter will not be added if the sout is not used
---
 modules/stream_out/chromecast/chromecast_demux.cpp | 2 +-
 src/input/demux.c                                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/stream_out/chromecast/chromecast_demux.cpp b/modules/stream_out/chromecast/chromecast_demux.cpp
index c66735e..bc932a5 100644
--- a/modules/stream_out/chromecast/chromecast_demux.cpp
+++ b/modules/stream_out/chromecast/chromecast_demux.cpp
@@ -296,7 +296,7 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_DEMUX )
     set_description( N_( "chromecast demux wrapper" ) )
-    set_capability( "demux_filter", 0 )
+    set_capability( "demux_filter", 1 ) // try to insert the filter by default
     add_shortcut( "cc_demux" )
     set_callbacks( Open, Close )
 vlc_module_end ()
diff --git a/src/input/demux.c b/src/input/demux.c
index 10baebd..73e7721 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -704,7 +704,7 @@ error:
 demux_filter_t *demux_FilterChainNew( demux_filter_t *p_demux, const char *psz_chain )
 {
     if( !psz_chain || !*psz_chain )
-        return NULL;
+        return demux_FilterNew( p_demux, NULL ); /* add permanent filters */
 
     char *psz_parser = strdup(psz_chain);
     if(!psz_parser)
-- 
2.7.0



More information about the vlc-devel mailing list