Commit e9afc056 authored by Rafaël Carré's avatar Rafaël Carré

decoder: Simplify DecoderWaitUnblock() proto

parent 5438da27
...@@ -1018,7 +1018,7 @@ static bool DecoderIsFlushing( decoder_t *p_dec ) ...@@ -1018,7 +1018,7 @@ static bool DecoderIsFlushing( decoder_t *p_dec )
return b_flushing; return b_flushing;
} }
static void DecoderWaitUnblock( decoder_t *p_dec, bool *pb_reject ) static bool DecoderWaitUnblock( decoder_t *p_dec )
{ {
decoder_owner_sys_t *p_owner = p_dec->p_owner; decoder_owner_sys_t *p_owner = p_dec->p_owner;
...@@ -1046,8 +1046,7 @@ static void DecoderWaitUnblock( decoder_t *p_dec, bool *pb_reject ) ...@@ -1046,8 +1046,7 @@ static void DecoderWaitUnblock( decoder_t *p_dec, bool *pb_reject )
vlc_cond_wait( &p_owner->wait_request, &p_owner->lock ); vlc_cond_wait( &p_owner->wait_request, &p_owner->lock );
} }
if( pb_reject ) return p_owner->b_flushing;
*pb_reject = p_owner->b_flushing;
} }
static void DecoderOutputChangePause( decoder_t *p_dec, bool b_paused, mtime_t i_date ) static void DecoderOutputChangePause( decoder_t *p_dec, bool b_paused, mtime_t i_date )
...@@ -1195,9 +1194,9 @@ static void DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio, ...@@ -1195,9 +1194,9 @@ static void DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio,
for( ;; ) for( ;; )
{ {
bool b_has_more = false, b_paused, b_reject; bool b_has_more = false, b_paused;
DecoderWaitUnblock( p_dec, &b_reject ); bool b_reject = DecoderWaitUnblock( p_dec );
if( p_owner->b_buffering ) if( p_owner->b_buffering )
break; break;
...@@ -1398,9 +1397,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture, ...@@ -1398,9 +1397,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
{ {
bool b_has_more = false; bool b_has_more = false;
bool b_reject; bool b_reject = DecoderWaitUnblock( p_dec );
DecoderWaitUnblock( p_dec, &b_reject );
if( p_owner->b_buffering && !p_owner->buffer.b_first ) if( p_owner->b_buffering && !p_owner->buffer.b_first )
{ {
...@@ -1575,8 +1572,7 @@ static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic ) ...@@ -1575,8 +1572,7 @@ static void DecoderPlaySpu( decoder_t *p_dec, subpicture_t *p_subpic )
for( ;; ) for( ;; )
{ {
bool b_has_more = false; bool b_has_more = false;
bool b_reject; bool b_reject = DecoderWaitUnblock( p_dec );
DecoderWaitUnblock( p_dec, &b_reject );
if( p_owner->b_buffering ) if( p_owner->b_buffering )
{ {
...@@ -1650,8 +1646,7 @@ static void DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block ) ...@@ -1650,8 +1646,7 @@ static void DecoderPlaySout( decoder_t *p_dec, block_t *p_sout_block )
for( ;; ) for( ;; )
{ {
bool b_has_more = false; bool b_has_more = false;
bool b_reject; bool b_reject = DecoderWaitUnblock( p_dec );
DecoderWaitUnblock( p_dec, &b_reject );
if( p_owner->b_buffering ) if( p_owner->b_buffering )
{ {
......
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