[FFmpeg-devel] [PATCH] lavf/vsrc_ddagrab: WinAPI functions must be called as stdcall in x86_32

Vadim Guchenko yhw at relost.net
Sun Apr 7 03:57:06 EEST 2024


Now I get Access Violation when using ddagrab filter in ffmpeg compiled for x86_32 architecture.

More information here: https://trac.ffmpeg.org/ticket/10914

diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c
--- a/libavfilter/vsrc_ddagrab.c
+++ b/libavfilter/vsrc_ddagrab.c
@@ -178,7 +178,7 @@ static av_cold int init_dxgi_dda(AVFilterContext *avctx)
 #if HAVE_IDXGIOUTPUT5 && HAVE_DPI_AWARENESS_CONTEXT
     IDXGIOutput5 *dxgi_output5 = NULL;
 
-    typedef DPI_AWARENESS_CONTEXT (*set_thread_dpi_t)(DPI_AWARENESS_CONTEXT);
+    typedef DPI_AWARENESS_CONTEXT (__stdcall *set_thread_dpi_t)(DPI_AWARENESS_CONTEXT);
     set_thread_dpi_t set_thread_dpi;
     HMODULE user32_module;
 #endif

-- 
Best regards,
 Vadim



More information about the ffmpeg-devel mailing list