summaryrefslogtreecommitdiff
path: root/libavfilter/vf_dnn_processing.c
diff options
context:
space:
mode:
authorGuo, Yejun <yejun.guo@intel.com>2020-12-30 10:47:29 +0800
committerGuo, Yejun <yejun.guo@intel.com>2020-12-31 08:31:17 +0800
commit97f520b700b9c250883bf6e3a06fbb6ebffc3c91 (patch)
tree10587ad2f01bcaba19f60f6828682dc6d0aeda02 /libavfilter/vf_dnn_processing.c
parent8e78d5d394a3cdeb1da195aa901ff2f7b5b1b3ea (diff)
dnn: fix issue when pthread is not supported
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Diffstat (limited to 'libavfilter/vf_dnn_processing.c')
-rw-r--r--libavfilter/vf_dnn_processing.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c
index da4508b50e..fff5696a31 100644
--- a/libavfilter/vf_dnn_processing.c
+++ b/libavfilter/vf_dnn_processing.c
@@ -110,6 +110,13 @@ static av_cold int init(AVFilterContext *context)
av_log(ctx, AV_LOG_WARNING, "this backend does not support async execution, roll back to sync.\n");
}
+#if !HAVE_PTHREAD_CANCEL
+ if (ctx->async) {
+ ctx->async = 0;
+ av_log(ctx, AV_LOG_WARNING, "pthread is not supported, roll back to sync.\n");
+ }
+#endif
+
return 0;
}