diff options
author | Timo Rothenpieler <[email protected]> | 2025-09-14 20:46:29 +0200 |
---|---|---|
committer | Timo Rothenpieler <[email protected]> | 2025-09-14 20:46:29 +0200 |
commit | 570949822b0fdfee96b055a8d4cce345a5334203 (patch) | |
tree | e9f01d66d0ce75ac2313017427074784bbce35ec /libavfilter/vsrc_gfxcapture_winrt.cpp | |
parent | d74d3080ffdd358c595cf363f4053860d8fbb17d (diff) |
avfilter/vsrc_gfxcapture: MapWindowPoints can return 0 and still succeed
Diffstat (limited to 'libavfilter/vsrc_gfxcapture_winrt.cpp')
-rw-r--r-- | libavfilter/vsrc_gfxcapture_winrt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vsrc_gfxcapture_winrt.cpp b/libavfilter/vsrc_gfxcapture_winrt.cpp index 89cbdd3df9..49181f1c0e 100644 --- a/libavfilter/vsrc_gfxcapture_winrt.cpp +++ b/libavfilter/vsrc_gfxcapture_winrt.cpp @@ -264,7 +264,8 @@ static int wgc_calculate_client_area(AVFilterContext *avctx) return AVERROR_EXTERNAL; } - if (!MapWindowPoints(ctx->capture_hwnd, nullptr, (POINT*)&client_rect, 2)) { + SetLastError(0); + if (!MapWindowPoints(ctx->capture_hwnd, nullptr, (POINT*)&client_rect, 2) && GetLastError()) { av_log(avctx, AV_LOG_ERROR, "MapWindowPoints failed\n"); return AVERROR_EXTERNAL; } |