[vlc-devel] [PATCH 2/2] background_worker: Inline task_Destroy
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Feb 6 16:11:16 CET 2020
---
src/misc/background_worker.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/misc/background_worker.c b/src/misc/background_worker.c
index f649b402e0..80afefc2e2 100644
--- a/src/misc/background_worker.c
+++ b/src/misc/background_worker.c
@@ -78,11 +78,6 @@ static struct task *task_Create(struct background_worker *worker, void *id,
return task;
}
-static void task_Destroy(struct background_worker *worker, struct task *task)
-{
- worker->conf.pf_release(task->entity);
-}
-
static struct task *QueueTake(struct background_worker *worker, int timeout_ms)
{
vlc_mutex_assert(&worker->lock);
@@ -120,7 +115,7 @@ static void QueueRemoveAll(struct background_worker *worker, void *id)
if (!id || task->id == id)
{
vlc_list_remove(&task->node);
- task_Destroy(worker, task);
+ worker->conf.pf_release(task->entity);
free(task);
}
}
@@ -178,7 +173,7 @@ static void background_worker_Destroy(struct background_worker *worker)
static void TerminateTask(struct background_thread *thread, struct task *task)
{
struct background_worker *worker = thread->owner;
- task_Destroy(worker, task);
+ worker->conf.pf_release(task->entity);
vlc_mutex_lock(&worker->lock);
free(task);
--
2.20.1
More information about the vlc-devel
mailing list