[vlc-commits] stream filter: provide file path in addition to URL

Rémi Denis-Courmont git at videolan.org
Mon Feb 26 19:57:31 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb 26 20:56:55 2018 +0200| [ef8618e457ee882906a9f2b9bac758a01c750a8a] | committer: Rémi Denis-Courmont

stream filter: provide file path in addition to URL

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

 src/input/stream_filter.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
index 32442566e6..c747751440 100644
--- a/src/input/stream_filter.c
+++ b/src/input/stream_filter.c
@@ -53,6 +53,9 @@ stream_t *vlc_stream_FilterNew( stream_t *p_source,
         s->psz_url = strdup( p_source->psz_url );
         if( unlikely(s->psz_url == NULL) )
             goto error;
+
+        if( p_source->psz_filepath != NULL )
+            s->psz_filepath = strdup( p_source->psz_filepath );
     }
     s->s = p_source;
 
@@ -63,6 +66,7 @@ stream_t *vlc_stream_FilterNew( stream_t *p_source,
 
     return s;
 error:
+    free(s->psz_filepath);
     stream_CommonDelete( s );
     return NULL;
 }
@@ -113,6 +117,8 @@ static void StreamDelete( stream_t *s )
 
     if( s->s != NULL )
         vlc_stream_Delete( s->s );
+
+    free(s->psz_filepath);
 }
 
 int vlc_stream_FilterDefaultReadDir( stream_t *s, input_item_node_t *p_node )



More information about the vlc-commits mailing list