[vlc-commits] access: create access before stream

Rémi Denis-Courmont git at videolan.org
Sat Mar 31 17:02:21 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 31 16:15:03 2018 +0300| [8f349c578db2812f956d9689e287d7dbefcdb3b7] | committer: Rémi Denis-Courmont

access: create access before stream

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

 src/input/access.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/input/access.c b/src/input/access.c
index d0fa1f46a7..598aaad1ec 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -256,14 +256,14 @@ static void AStreamDestroy(stream_t *s)
 stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
                            es_out_t *out, bool preparsing, const char *url)
 {
-    stream_t *s = vlc_stream_CommonNew(parent, AStreamDestroy);
-    if (unlikely(s == NULL))
+    stream_t *access = access_New(parent, input, out, preparsing, url);
+    if (access == NULL)
         return NULL;
 
-    stream_t *access = access_New(VLC_OBJECT(s), input, out, preparsing, url);
-    if (access == NULL)
+    stream_t *s = vlc_stream_CommonNew(parent, AStreamDestroy);
+    if (unlikely(s == NULL))
     {
-        stream_CommonDelete(s);
+        vlc_stream_Delete(access);
         return NULL;
     }
 



More information about the vlc-commits mailing list