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

Git pushed a commit to branch master
in repository ffmpeg.

commit 532486e0a51c47c94496bc0bcc2859fb14b2a808
Author:     Rafael Henrique Gonçalves de Oliveira <[email protected]>
AuthorDate: Fri Oct 23 20:41:57 2026 -0300
Commit:     Timo Rothenpieler <[email protected]>
CommitDate: Sat Oct 24 20:55:29 2026 +0000

    avfilter/vsrc_gfxcapture: use fresh callback state for each WGC thread call
    
    run_on_wgc_thread() reused one callback state for every call and reset
    its cancel flag each time. A callback that timed out while still queued
    could then run after the next call's reset, through references to the
    earlier caller's stack. Each call now gets its own state, which the
    queued callback keeps alive.
    
    Signed-off-by: Rafael Henrique Gonçalves de Oliveira <[email protected]>
---
 libavfilter/vsrc_gfxcapture_winrt.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavfilter/vsrc_gfxcapture_winrt.cpp 
b/libavfilter/vsrc_gfxcapture_winrt.cpp
index 4b1c43700d..06a3c7c39b 100644
--- a/libavfilter/vsrc_gfxcapture_winrt.cpp
+++ b/libavfilter/vsrc_gfxcapture_winrt.cpp
@@ -150,7 +150,6 @@ struct GfxCaptureContextCpp {
     volatile int wgc_thread_init_res { INT_MAX };
     std::recursive_mutex wgc_thread_uninit_mutex;
     volatile int wgc_thread_res { 0 };
-    std::shared_ptr<void> wgc_thread_cb_data;
 
     HWND capture_hwnd { nullptr };
     HMONITOR capture_hmonitor { nullptr };
@@ -722,10 +721,7 @@ static int run_on_wgc_thread(AVFilterContext *avctx, F 
&&cb)
         bool cancel;
         int ret;
     };
-    auto cbdata = ctx->wgc_thread_cb_data ?
-                  std::static_pointer_cast<CBData>(ctx->wgc_thread_cb_data) :
-                  std::make_shared<CBData>();
-    ctx->wgc_thread_cb_data = cbdata;
+    auto cbdata = std::make_shared<CBData>();
 
     cbdata->done = cbdata->cancel = false;
     cbdata->ret = AVERROR_BUG;

-- 
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