-----Original Message-----
From: tknaveen via ffmpeg-devel <[email protected]> 
Sent: Thursday, April 30, 2026 7:14 PM
To: [email protected]
Cc: tknaveen <[email protected]>
Subject: [FFmpeg-devel] [PATCH] 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.

Fixes regression in 346fe01607ba.
---
 libavfilter/dnn/dnn_backend_torch.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/dnn/dnn_backend_torch.cpp 
b/libavfilter/dnn/dnn_backend_torch.cpp
index 6cd93fd136..bba166ce5f 100644
--- a/libavfilter/dnn/dnn_backend_torch.cpp
+++ b/libavfilter/dnn/dnn_backend_torch.cpp
@@ -342,9 +342,9 @@ static int execute_model_th(THRequestItem *request, Queue 
*lltask_queue)
     }
 
     if (task->async) {
-        if (ff_dnn_start_inference_async(th_model->ctx, &request->exec_module) 
!= 0) {
+        ret = ff_dnn_start_inference_async(th_model->ctx, 
&request->exec_module);
+        if (ret != 0)
             goto err;
-        }

Nice catch, will rebase locally and push soon. Thanks.
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to