Commit 6c786aa5 authored by Thomas Guillem's avatar Thomas Guillem

vout: change vout_Cancel arguments

Add a boolean to reset the cancel state to false
parent 7ae04107
...@@ -1866,7 +1866,7 @@ void input_DecoderDelete( decoder_t *p_dec ) ...@@ -1866,7 +1866,7 @@ void input_DecoderDelete( decoder_t *p_dec )
* This unblocks the thread, allowing the decoder module to join all its * This unblocks the thread, allowing the decoder module to join all its
* worker threads (if any) and the decoder thread to terminate. */ * worker threads (if any) and the decoder thread to terminate. */
if( p_owner->p_vout != NULL ) if( p_owner->p_vout != NULL )
vout_Cancel( p_owner->p_vout ); vout_Cancel( p_owner->p_vout, true );
vlc_mutex_unlock( &p_owner->lock ); vlc_mutex_unlock( &p_owner->lock );
vlc_join( p_owner->thread, NULL ); vlc_join( p_owner->thread, NULL );
......
...@@ -303,9 +303,9 @@ static void VoutDestructor(vlc_object_t *object) ...@@ -303,9 +303,9 @@ static void VoutDestructor(vlc_object_t *object)
} }
/* */ /* */
void vout_Cancel(vout_thread_t *vout) void vout_Cancel(vout_thread_t *vout, bool canceled)
{ {
vout_control_PushVoid(&vout->p->control, VOUT_CONTROL_CANCEL); vout_control_PushBool(&vout->p->control, VOUT_CONTROL_CANCEL, canceled);
vout_control_WaitEmpty(&vout->p->control); vout_control_WaitEmpty(&vout->p->control);
} }
...@@ -1455,9 +1455,9 @@ static int ThreadReinit(vout_thread_t *vout, ...@@ -1455,9 +1455,9 @@ static int ThreadReinit(vout_thread_t *vout,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
static void ThreadCancel(vout_thread_t *vout) static void ThreadCancel(vout_thread_t *vout, bool canceled)
{ {
picture_pool_Cancel(vout->p->decoder_pool, true); picture_pool_Cancel(vout->p->decoder_pool, canceled);
} }
static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd) static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
...@@ -1480,7 +1480,7 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd) ...@@ -1480,7 +1480,7 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
return 1; return 1;
break; break;
case VOUT_CONTROL_CANCEL: case VOUT_CONTROL_CANCEL:
ThreadCancel(vout); ThreadCancel(vout, cmd.u.boolean);
break; break;
case VOUT_CONTROL_SUBPICTURE: case VOUT_CONTROL_SUBPICTURE:
ThreadDisplaySubpicture(vout, cmd.u.subpicture); ThreadDisplaySubpicture(vout, cmd.u.subpicture);
......
...@@ -53,9 +53,10 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date ); ...@@ -53,9 +53,10 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
void vout_Reset( vout_thread_t *p_vout ); void vout_Reset( vout_thread_t *p_vout );
/* /*
* Cancel the vout, it won't return any pictures after this call. * Cancel the vout, if cancel is true, it won't return any pictures after this
* call.
*/ */
void vout_Cancel( vout_thread_t *p_vout ); void vout_Cancel( vout_thread_t *p_vout, bool b_canceled );
/** /**
* This function will force to display the next picture while paused * This function will force to display the next picture while paused
......
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