Commit 532486e0a5 for ffmpeg

commit 532486e0a51c47c94496bc0bcc2859fb14b2a808
Author: Rafael Henrique Gonçalves de Oliveira <rafaelh9six@gmail.com>
Date:   Fri Oct 23 20:41:57 2026 -0300

    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 <rafaelh9six@gmail.com>

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;