avfilter/dnn_backend_torch: fix missing ret in async error path
ff_dnn_start_inference_async() return value was not stored in ret, causing execute_model_th() to return success on async startup failure. This left vf_dnn_processing stuck in its flush loop waiting on a task that was never started.
This commit is contained in:
@@ -342,7 +342,11 @@ static int execute_model_th(THRequestItem *request, Queue *lltask_queue)
|
||||
}
|
||||
|
||||
if (task->async) {
|
||||
return ff_dnn_start_inference_async(th_model->ctx, &request->exec_module);
|
||||
ret = ff_dnn_start_inference_async(th_model->ctx, &request->exec_module);
|
||||
if (ret != 0) {
|
||||
goto err;
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
// Synchronous execution path
|
||||
ret = th_start_inference((void *)(request));
|
||||
|
||||
Reference in New Issue
Block a user