[vlc-commits] input: support combined access-demux as access
Rémi Denis-Courmont
git at videolan.org
Sat Mar 31 17:02:25 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 25 06:35:04 2018 +0300| [26dee4a287f4d7891a0d3045431bed4eb8aa9621] | committer: Rémi Denis-Courmont
input: support combined access-demux as access
This adds support for instantiating a combined access-demux module
using the access capability. This gives full flexibility to order
demux, directory and stream access modules.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=26dee4a287f4d7891a0d3045431bed4eb8aa9621
---
src/input/input.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/input/input.c b/src/input/input.c
index a0b6775f77..47db3efaed 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2430,13 +2430,22 @@ static demux_t *InputDemuxNew( input_thread_t *p_input, input_source_t *p_source
if( asprintf( &psz_base_mrl, "%s://%s", psz_access, psz_path ) < 0 )
return NULL;
- stream_t *p_stream = stream_AccessNew( obj, p_input, NULL,
+ stream_t *p_stream = stream_AccessNew( obj, p_input, priv->p_es_out,
priv->b_preparsing, psz_base_mrl );
free( psz_base_mrl );
if( p_stream == NULL )
return NULL;
+ if( p_stream->pf_read == NULL && p_stream->pf_block == NULL
+ && p_stream->pf_readdir == NULL )
+ { /* Combined access/demux, no stream filtering */
+ MRLSections( psz_anchor,
+ &p_source->i_title_start, &p_source->i_title_end,
+ &p_source->i_seekpoint_start, &p_source->i_seekpoint_end );
+ return p_stream;
+ }
+
/* attach explicit stream filters to stream */
char *psz_filters = var_InheritString( obj, "stream-filter" );
if( psz_filters )
More information about the vlc-commits
mailing list