From cd5c7ea79e3b2440497b43186694cf54dc2b5bd1 Mon Sep 17 00:00:00 2001 From: Brendan McGrath Date: Wed, 1 May 2024 13:32:39 +1000 Subject: [PATCH] winegstreamer: Fix wow64 support for wg_parser_connect. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56595 --- dlls/winegstreamer/wg_parser.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 2d00f4247e0..6a2da80257b 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -2213,7 +2213,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] = X(wg_parser_create), X(wg_parser_destroy), - X(wg_parser_connect), + X64(wg_parser_connect), X(wg_parser_disconnect), X(wg_parser_get_next_read_offset), @@ -2274,6 +2274,24 @@ C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == unix_wg_funcs_count); typedef ULONG PTR32; +static NTSTATUS wow64_wg_parser_connect(void *args) +{ + struct + { + wg_parser_t parser; + PTR32 uri; + UINT64 file_size; + } *params32 = args; + struct wg_parser_connect_params params = + { + .parser = params32->parser, + .uri = ULongToPtr(params32->uri), + .file_size = params32->file_size, + }; + + return wg_parser_connect(¶ms); +} + static NTSTATUS wow64_wg_parser_push_data(void *args) { struct {