mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avfilter/vsrc_gfxcapture: MapWindowPoints can return 0 and still succeed
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user