Commit bbbc5b52 authored by Denis Charmet's avatar Denis Charmet

Don't demux 5 blocks each time pf_demux is called

Close #2658
parent 020d6bb4
...@@ -705,7 +705,6 @@ static int Demux( demux_t *p_demux) ...@@ -705,7 +705,6 @@ static int Demux( demux_t *p_demux)
vlc_mutex_unlock( &p_sys->lock_demuxer ); vlc_mutex_unlock( &p_sys->lock_demuxer );
return 0; return 0;
} }
int i_block_count = 0;
int i_return = 0; int i_return = 0;
for( ;; ) for( ;; )
...@@ -792,14 +791,9 @@ static int Demux( demux_t *p_demux) ...@@ -792,14 +791,9 @@ static int Demux( demux_t *p_demux)
BlockDecode( p_demux, block, simpleblock, p_sys->i_pts, i_block_duration, b_key_picture || b_discardable_picture ); BlockDecode( p_demux, block, simpleblock, p_sys->i_pts, i_block_duration, b_key_picture || b_discardable_picture );
delete block; delete block;
i_block_count++;
// TODO optimize when there is need to leave or when seeking has been called vlc_mutex_unlock( &p_sys->lock_demuxer );
if( i_block_count > 5 ) return 1;
{
i_return = 1;
break;
}
} }
vlc_mutex_unlock( &p_sys->lock_demuxer ); vlc_mutex_unlock( &p_sys->lock_demuxer );
......
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