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

Steve Lhomme robux4 at videolabs.io
Tue May 3 16:01:46 CEST 2016


So users don't have to set demux-filter=cc_demux everytime they select a
Chromecast output.
---
 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 a5fe8bc..b583e92 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 3c55941..63cf74b 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -699,7 +699,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, NULL ); /* add permanent filters */
 
     char *psz_parser = strdup(psz_chain);
     if(!psz_parser)
-- 
2.7.0



More information about the vlc-devel mailing list