[vlc-devel] [PATCH 11/21] input/stream: stream-fragments: use vlc_stream_CommonNewMRL in access_New
Filip Roséen
filip at atch.se
Sun Jul 31 22:42:20 CEST 2016
---
src/input/access.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/input/access.c b/src/input/access.c
index 5c0cbf9..65b3ce8 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -73,13 +73,12 @@ static access_t *access_New(vlc_object_t *parent, input_thread_t *input,
char *redirv[MAX_REDIR];
unsigned redirc = 0;
- stream_t *access = vlc_stream_CommonNew(parent, vlc_access_Destroy);
+ stream_t *access = vlc_stream_CommonNewMRL(parent, mrl, vlc_access_Destroy);
if (unlikely(access == NULL))
return NULL;
access->p_input = input;
access->psz_name = NULL;
- access->psz_url = strdup(mrl);
access->psz_filepath = NULL;
access->b_preparsing = preparsing;
@@ -280,6 +279,13 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
return NULL;
}
+ if( stream_CopyFragmentState( s, access ) )
+ {
+ vlc_stream_Delete( access );
+ stream_CommonDelete( s );
+ return NULL;
+ }
+
s->p_input = input;
s->psz_url = strdup(access->psz_url);
--
2.9.2
More information about the vlc-devel
mailing list