Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/winegstreamer/main.c | 4 +++- dlls/winegstreamer/unixlib.h | 2 +- dlls/winegstreamer/wg_parser.c | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c index fd73f79d365..37752a3078b 100644 --- a/dlls/winegstreamer/main.c +++ b/dlls/winegstreamer/main.c @@ -29,6 +29,8 @@
static unixlib_handle_t unix_handle;
+#define u64_from_user_ptr(ptr) ((ULONGLONG)(uintptr_t)(ptr)) + WINE_DEFAULT_DEBUG_CHANNEL(quartz);
DEFINE_GUID(GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -143,7 +145,7 @@ void wg_parser_push_data(wg_parser_t parser, const void *data, uint32_t size) struct wg_parser_push_data_params params = { .parser = parser, - .data = data, + .data_ptr = u64_from_user_ptr(data), .size = size, };
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index aa2e3c820a5..6280b3427d2 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -173,7 +173,7 @@ struct wg_parser_get_next_read_offset_params struct wg_parser_push_data_params { wg_parser_t parser; - const void *data; + ULONGLONG data_ptr; UINT32 size; };
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 7c9ba652125..1a4185a63b4 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -39,6 +39,8 @@
#include "unixlib.h"
+#define u64_to_user_ptr(u) ((void *)(uintptr_t)(u)) + typedef enum { GST_AUTOPLUG_SELECT_TRY, @@ -602,7 +604,7 @@ static NTSTATUS wg_parser_push_data(void *args) { const struct wg_parser_push_data_params *params = args; struct wg_parser *parser = get_wg_parser(params->parser); - const void *data = params->data; + const void *data = u64_to_user_ptr(params->data_ptr); uint32_t size = params->size;
pthread_mutex_lock(&parser->mutex);