Commit d7a26ed5 authored by Santiago's avatar Santiago Committed by Tim-Philipp Müller

taskpool: Set error in case something goes wrong in the default handlers

parent 3555b3eb
......@@ -35,6 +35,7 @@
#include "gstinfo.h"
#include "gsttaskpool.h"
#include "gsterror.h"
#define GST_CAT_DEFAULT (taskpool_debug)
......@@ -73,7 +74,7 @@ static void
default_prepare (GstTaskPool * pool, GError ** error)
pool->pool = g_thread_pool_new ((GFunc) default_func, pool, -1, FALSE, NULL);
pool->pool = g_thread_pool_new ((GFunc) default_func, pool, -1, FALSE, error);
......@@ -106,6 +107,9 @@ default_push (GstTaskPool * pool, GstTaskPoolFunction func,
g_thread_pool_push (pool->pool, tdata, error);
else {
g_slice_free (TaskData, tdata);
g_set_error_literal (error, GST_CORE_ERROR, GST_CORE_ERROR_FAILED,
"No thread pool");
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