[vlc-commits] stream: re-use existing input pointer for statistics

Rémi Denis-Courmont git at videolan.org
Mon Jul 11 17:38:06 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 11 18:16:36 2011 +0300| [38f24cc8dd8b1a1e88ba703907884f6bd86bb7da] | committer: Rémi Denis-Courmont

stream: re-use existing input pointer for statistics

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

 src/input/stream.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index a2ebd08..f56393d 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -1680,14 +1680,10 @@ static int AReadStream( stream_t *s, void *p_read, unsigned int i_read )
 {
     stream_sys_t *p_sys = s->p_sys;
     access_t *p_access = p_sys->p_access;
-    input_thread_t *p_input = NULL;
+    input_thread_t *p_input = s->p_input;
     int i_read_orig = i_read;
     int i_total = 0;
 
-    if( s->p_parent && s->p_parent->p_parent &&
-        vlc_internals( s->p_parent->p_parent )->i_object_type == VLC_OBJECT_INPUT )
-        p_input = (input_thread_t *)s->p_parent->p_parent;
-
     if( !p_sys->i_list )
     {
         i_read = p_access->pf_read( p_access, p_read, i_read );
@@ -1749,15 +1745,11 @@ static block_t *AReadBlock( stream_t *s, bool *pb_eof )
 {
     stream_sys_t *p_sys = s->p_sys;
     access_t *p_access = p_sys->p_access;
-    input_thread_t *p_input = NULL;
+    input_thread_t *p_input = s->p_input;
     block_t *p_block;
     bool b_eof;
     int i_total = 0;
 
-    if( s->p_parent && s->p_parent->p_parent &&
-        vlc_internals( s->p_parent->p_parent )->i_object_type == VLC_OBJECT_INPUT )
-        p_input = (input_thread_t *)s->p_parent->p_parent;
-
     if( !p_sys->i_list )
     {
         p_block = p_access->pf_block( p_access );



More information about the vlc-commits mailing list