Commit 7ae04107 authored by Thomas Guillem's avatar Thomas Guillem

picture_pool: change picture_pool_Cancel arguments

Add a boolean to reset the cancel state to false.
parent 65d23455
......@@ -160,11 +160,11 @@ unsigned picture_pool_Reset( picture_pool_t * );
/**
* Cancel the picture pool.
*
* It won't return any pictures via picture_pool_Get or picture_pool_Wait after
* this call. This function will also unblock picture_pool_Wait. Call
* picture_pool_Reset to reset the cancel state.
* It won't return any pictures via picture_pool_Get or picture_pool_Wait if
* canceled is true. This function will also unblock picture_pool_Wait.
* picture_pool_Reset will also reset the cancel state to false.
*/
void picture_pool_Cancel( picture_pool_t * );
void picture_pool_Cancel( picture_pool_t *, bool canceled );
/**
* Reserves pictures from a pool and creates a new pool with those.
......
......@@ -277,12 +277,13 @@ picture_t *picture_pool_Wait(picture_pool_t *pool)
return clone;
}
void picture_pool_Cancel(picture_pool_t *pool)
void picture_pool_Cancel(picture_pool_t *pool, bool canceled)
{
vlc_mutex_lock(&pool->lock);
assert(pool->refs > 0);
pool->canceled = true;
pool->canceled = canceled;
if (canceled)
vlc_cond_broadcast(&pool->wait);
vlc_mutex_unlock(&pool->lock);
}
......
......@@ -1457,7 +1457,7 @@ static int ThreadReinit(vout_thread_t *vout,
static void ThreadCancel(vout_thread_t *vout)
{
picture_pool_Cancel(vout->p->decoder_pool);
picture_pool_Cancel(vout->p->decoder_pool, true);
}
static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
......
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