This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 33ac0ca199aaeb48067cef9eef09bbbea6faf622
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Oct 13 06:10:50 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Tue Oct 20 20:41:50 2026 +0000

    avfilter/dnn_backend_openvino: wait only for the inference requests that 
were created
    
    Fixes: nC3u8khGyx61
    Fixes: hang on teardown
    Hang on teardown Replicated through UnModified FFmpeg with gdb
    Hang on teardown Replicated through UnModified FFmpeg with gdb, a crafted 
10240x10240 PNG, input_resizable=1 and vm.overcommit_memory=2
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24617
---
 libavfilter/dnn/dnn_backend_openvino.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/dnn/dnn_backend_openvino.c 
b/libavfilter/dnn/dnn_backend_openvino.c
index 9b83670a71..180e61bbfa 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -62,6 +62,7 @@ typedef struct OVModel{
     Queue *task_queue;          // holds TaskItem
     Queue *lltask_queue;     // holds LastLevelTaskItem
     int nb_outputs;
+    int nb_requests;
 } OVModel;
 
 // one request for one call to openvino
@@ -516,7 +517,7 @@ static void dnn_free_model_ov(DNNModel **model)
         return;
 
     ov_model = (OVModel *)(*model);
-    ff_dnn_wait_requests(ov_model->request_queue, ov_model->ctx->nireq);
+    ff_dnn_wait_requests(ov_model->request_queue, ov_model->nb_requests);
     while (ff_safe_queue_size(ov_model->request_queue) != 0) {
         OVRequestItem *item = ff_safe_queue_pop_front(ov_model->request_queue);
         if (item && item->infer_request) {
@@ -910,6 +911,7 @@ static int init_model_ov(OVModel *ov_model, const char 
*input_name, const char *
             ret = AVERROR(ENOMEM);
             goto err;
         }
+        ov_model->nb_requests++;
 
 #if HAVE_OPENVINO2
         status = 
ov_compiled_model_create_infer_request(ov_model->compiled_model, 
&item->infer_request);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to