[FFmpeg-devel] [PATCH 3/5] avfilter/dnn: fix the return value of async_thread_routine
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Thu Dec 9 03:19:41 EET 2021
From: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavfilter/dnn/dnn_backend_common.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavfilter/dnn/dnn_backend_common.c b/libavfilter/dnn/dnn_backend_common.c
index 6a9c4cc..8c020e5 100644
--- a/libavfilter/dnn/dnn_backend_common.c
+++ b/libavfilter/dnn/dnn_backend_common.c
@@ -83,10 +83,13 @@ static void *async_thread_routine(void *args)
void *request = async_module->args;
if (async_module->start_inference(request) != DNN_SUCCESS) {
- return DNN_ASYNC_FAIL;
+ pthread_exit((void*)DNN_ASYNC_FAIL);
+ return NULL;
}
async_module->callback(request);
- return DNN_ASYNC_SUCCESS;
+
+ pthread_exit((void*)DNN_ASYNC_SUCCESS);
+ return NULL;
}
DNNReturnType ff_dnn_async_module_cleanup(DNNAsyncExecModule *async_module)
--
1.8.3.1
More information about the ffmpeg-devel
mailing list