]> git.sesse.net Git - vlc/blobdiff - src/input/stream_memory.c
Implement access_GetParentInput and demux_GetParentInput and use.
[vlc] / src / input / stream_memory.c
index 8cd3c43725ff27bc2fdc1e7aff810e8f0038678e..7444fda2d044c7beb5186e55c67c3a5a6b38af17 100644 (file)
@@ -78,6 +78,12 @@ stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
 
     vlc_object_attach( s, p_this );
 
+    /* Get a weak link to the parent input */
+    /* FIXME: The usage of vlc_object_find has to be removed. */
+    s->p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT );
+    if(s->p_input)
+        vlc_object_release((vlc_object_t*)s->p_input);
+
     return s;
 }