[vlc-commits] access: pass ES output to access_New()

Rémi Denis-Courmont git at videolan.org
Thu Mar 29 17:23:09 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 24 12:38:59 2018 +0200| [9c6cde9415231dde72ecc396458a42388a36858a] | committer: Rémi Denis-Courmont

access: pass ES output to access_New()

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

 src/input/access.c | 9 +++++----
 src/input/input.c  | 4 ++--
 src/input/stream.c | 2 +-
 src/input/stream.h | 3 ++-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/input/access.c b/src/input/access.c
index 430f54236c..05b50cbe8a 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -67,7 +67,7 @@ static void vlc_access_Destroy(stream_t *access)
  * access_New:
  *****************************************************************************/
 static stream_t *access_New(vlc_object_t *parent, input_thread_t *input,
-                            bool preparsing, const char *mrl)
+                            es_out_t *out, bool preparsing, const char *mrl)
 {
     char *redirv[MAX_REDIR];
     unsigned redirc = 0;
@@ -77,6 +77,7 @@ static stream_t *access_New(vlc_object_t *parent, input_thread_t *input,
         return NULL;
 
     access->p_input = input;
+    access->out = out;
     access->psz_name = NULL;
     access->psz_url = strdup(mrl);
     access->psz_filepath = NULL;
@@ -145,7 +146,7 @@ error:
 
 stream_t *vlc_access_NewMRL(vlc_object_t *parent, const char *mrl)
 {
-    return access_New(parent, NULL, false, mrl);
+    return access_New(parent, NULL, NULL, false, mrl);
 }
 
 /*****************************************************************************
@@ -261,13 +262,13 @@ static void AStreamDestroy(stream_t *s)
 }
 
 stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
-                           bool preparsing, const char *url)
+                           es_out_t *out, bool preparsing, const char *url)
 {
     stream_t *s = vlc_stream_CommonNew(parent, AStreamDestroy);
     if (unlikely(s == NULL))
         return NULL;
 
-    stream_t *access = access_New(VLC_OBJECT(s), input, preparsing, url);
+    stream_t *access = access_New(VLC_OBJECT(s), input, out, preparsing, url);
     if (access == NULL)
     {
         stream_CommonDelete(s);
diff --git a/src/input/input.c b/src/input/input.c
index 6bac6a9a78..a0b6775f77 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2430,8 +2430,8 @@ 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, priv->b_preparsing,
-                                           psz_base_mrl );
+    stream_t *p_stream = stream_AccessNew( obj, p_input, NULL,
+                                           priv->b_preparsing, psz_base_mrl );
     free( psz_base_mrl );
 
     if( p_stream == NULL )
diff --git a/src/input/stream.c b/src/input/stream.c
index 0ed08df918..72760ce82f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -129,7 +129,7 @@ stream_t *(vlc_stream_NewURL)(vlc_object_t *p_parent, const char *psz_url)
     if( !psz_url )
         return NULL;
 
-    stream_t *s = stream_AccessNew( p_parent, NULL, false, psz_url );
+    stream_t *s = stream_AccessNew( p_parent, NULL, NULL, false, psz_url );
     if( s == NULL )
         msg_Err( p_parent, "no suitable access module for `%s'", psz_url );
     return s;
diff --git a/src/input/stream.h b/src/input/stream.h
index c481e7fe10..0ea78b8c00 100644
--- a/src/input/stream.h
+++ b/src/input/stream.h
@@ -34,7 +34,8 @@ void stream_CommonDelete( stream_t *s );
 /**
  * This function creates a raw stream_t from an URL.
  */
-stream_t *stream_AccessNew(vlc_object_t *, input_thread_t *, bool, const char *);
+stream_t *stream_AccessNew(vlc_object_t *, input_thread_t *, es_out_t *, bool,
+                           const char *);
 
 /**
  * Probes stream filters automatically.



More information about the vlc-commits mailing list