Commit 9d2636c5 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

stream: Do not yield and then release. It is unuseful here.

Because there is no proper convention, there is no reason why the object couldn't be detached. We would need to vlc_object_find the input to be sure there is no problem. Let's assume for now that the input creates the access and is responsible for it.
parent 50db778e
...@@ -1687,7 +1687,6 @@ static int AReadStream( stream_t *s, void *p_read, int i_read ) ...@@ -1687,7 +1687,6 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
i_read = p_access->pf_read( p_access, p_read, i_read ); i_read = p_access->pf_read( p_access, p_read, i_read );
if( p_input ) if( p_input )
{ {
vlc_object_yield( p_input );
vlc_mutex_lock( &p_input->p->counters.counters_lock ); vlc_mutex_lock( &p_input->p->counters.counters_lock );
stats_UpdateInteger( s, p_input->p->counters.p_read_bytes, i_read, stats_UpdateInteger( s, p_input->p->counters.p_read_bytes, i_read,
&i_total ); &i_total );
...@@ -1695,7 +1694,6 @@ static int AReadStream( stream_t *s, void *p_read, int i_read ) ...@@ -1695,7 +1694,6 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
(float)i_total, NULL ); (float)i_total, NULL );
stats_UpdateInteger( s, p_input->p->counters.p_read_packets, 1, NULL ); stats_UpdateInteger( s, p_input->p->counters.p_read_packets, 1, NULL );
vlc_mutex_unlock( &p_input->p->counters.counters_lock ); vlc_mutex_unlock( &p_input->p->counters.counters_lock );
vlc_object_release( p_input );
} }
return i_read; return i_read;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment