[vlc-commits] stream_MemoryNew: remove vlc_object_find()

Rémi Denis-Courmont git at videolan.org
Tue Mar 29 19:05:44 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 29 20:01:37 2011 +0300| [de401510c3c27db80a6831eda9b1f74a0d7c88a6] | committer: Rémi Denis-Courmont

stream_MemoryNew: remove vlc_object_find()

As for the previous commit, this seems more harmful than helpful.

Due to the UTF-16 subtitle hack present in the stream layer, this
commit will break in-memory UTF-16 subtitles character encoding if
UTF-8 autodetection was disabled and unless UTF-8 is the selected
encoding. On the other hand, this commit fixes subtitles encoding
if there is more than one subtitles stream in the whole input.

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

 src/input/stream_memory.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/input/stream_memory.c b/src/input/stream_memory.c
index 8af8254..f8700df 100644
--- a/src/input/stream_memory.c
+++ b/src/input/stream_memory.c
@@ -76,15 +76,9 @@ stream_t *stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
     s->pf_peek    = Peek;
     s->pf_control = Control;
     s->pf_destroy = Delete;
+    s->p_input = NULL;
 
     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;
 }
 



More information about the vlc-commits mailing list