Compare commits

...

13 Commits
v6.18 ... v6.19

Author SHA1 Message Date
Alistair Leslie-Hughes
d1ea5ced2b Release v6.19 2021-10-09 16:02:56 +11:00
Alistair Leslie-Hughes
8174243203 Reenabled mfplat patchset 2021-10-09 14:02:26 +11:00
Zebediah Figura
9e1a4bdb73 Rebase against 7554bd4b41a1429517eb86fd20dbe813cdd0550a. 2021-10-08 18:19:30 -05:00
Alistair Leslie-Hughes
dbf2d00a9b Restore iphlpapi-System_Ping
Changes upstream, means this need to be fixed another way.
2021-10-07 13:16:17 +11:00
Alistair Leslie-Hughes
c61d12592b Rebase against 3660176e09bc02e71586b4cf42f58c9498481af6. 2021-10-07 09:15:30 +11:00
Alistair Leslie-Hughes
7750a01cea Rebase against ed38d12833bb1957a915ac63128957dacf2bc245. 2021-10-06 09:30:42 +11:00
Alistair Leslie-Hughes
e41287e81a Rebase against 5a8dcb062793fbb68997e1b54ebc2666a2b2834d. 2021-10-05 08:55:24 +11:00
Alistair Leslie-Hughes
4d66e1bf6b Rebase against a87abdbe85779adf6a2a7897bd88984587880693. 2021-10-02 12:00:05 +10:00
Alistair Leslie-Hughes
c4535e89f7 Rebase against aa629c4c7225166f4ee46476d98702df2e142711. 2021-10-01 09:31:24 +10:00
Alistair Leslie-Hughes
7f9b324dea Rebase against 08b01d8271fe15c7680a957778d506221d7d94eb. 2021-09-30 10:41:59 +10:00
Alistair Leslie-Hughes
d8c1599a49 Rebase against bcdb28a563d43f2aebe28f457497bb36f59a50ea. 2021-09-29 09:12:17 +10:00
Alistair Leslie-Hughes
47a1fa55d6 Updated sapi-iteration-tokens patchset
Make the tests pass (GetId).
Stop new crash in "Beneath a Steel Sky".
2021-09-28 14:42:43 +10:00
Alistair Leslie-Hughes
0ff86943ed Rebase against de7adacedbdd78fd1ed8ee0986a78670e11a60bc. 2021-09-28 08:59:28 +10:00
50 changed files with 5910 additions and 651 deletions

View File

@@ -1,17 +1,17 @@
From 990050ed436283fb820d4fe64b08dda3ac7ea9e2 Mon Sep 17 00:00:00 2001
From 281b0621aa872330ab61f927750deb0753417ec8 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 8 Jun 2021 09:34:28 +1000
Subject: [PATCH 2/2] d3d10: Avoid implicit cast of interface pointer.
Subject: [PATCH] d3d10: Avoid implicit cast of interface pointer.
---
dlls/d3d10/effect.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 86ef50aac01..060fb69ce3e 100644
index 5a5f9f37e6d..c127cb2bd2d 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -126,7 +126,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
@@ -131,7 +131,7 @@ static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVariable(ID3D1
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderVariable(ID3D10EffectShaderVariable *iface)
{
@@ -19,8 +19,8 @@ index 86ef50aac01..060fb69ce3e 100644
+ return CONTAINING_RECORD((ID3D10EffectVariable*)iface, struct d3d10_effect_variable, ID3D10EffectVariable_iface);
}
struct d3d10_effect_state_property_info
@@ -4665,7 +4665,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
enum d3d10_effect_container_type
@@ -4969,7 +4969,7 @@ static void read_variable_array_from_buffer(struct d3d10_effect_variable *variab
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectScalarVariable(ID3D10EffectScalarVariable *iface)
{
@@ -29,7 +29,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_scalar_variable_IsValid(ID3D10EffectScalarVariable *iface)
@@ -5001,7 +5001,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
@@ -5305,7 +5305,7 @@ static const struct ID3D10EffectScalarVariableVtbl d3d10_effect_scalar_variable_
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectVectorVariable(ID3D10EffectVectorVariable *iface)
{
@@ -38,7 +38,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_vector_variable_IsValid(ID3D10EffectVectorVariable *iface)
@@ -5488,7 +5488,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
@@ -5792,7 +5792,7 @@ static void read_matrix_variable_array_from_buffer(struct d3d10_effect_variable
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectMatrixVariable(ID3D10EffectMatrixVariable *iface)
{
@@ -47,7 +47,7 @@ index 86ef50aac01..060fb69ce3e 100644
}
static BOOL STDMETHODCALLTYPE d3d10_effect_matrix_variable_IsValid(ID3D10EffectMatrixVariable *iface)
@@ -5995,7 +5995,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
@@ -6315,7 +6315,7 @@ static void set_shader_resource_variable(ID3D10ShaderResourceView **src, ID3D10S
static inline struct d3d10_effect_variable *impl_from_ID3D10EffectShaderResourceVariable(
ID3D10EffectShaderResourceVariable *iface)
{
@@ -57,5 +57,5 @@ index 86ef50aac01..060fb69ce3e 100644
static BOOL STDMETHODCALLTYPE d3d10_effect_shader_resource_variable_IsValid(ID3D10EffectShaderResourceVariable *iface)
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From 89c22c9894fd170b0b3a99309540c88059c64824 Mon Sep 17 00:00:00 2001
From 1768ecfc4a7181600df254069f02655fe4e5fa0b Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 11:29:24 -0500
Subject: [PATCH] bcrypt: Allow multiple backends to coexist.
@@ -7,18 +7,17 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
---
dlls/bcrypt/Makefile.in | 3 +-
dlls/bcrypt/bcrypt_internal.h | 3 +
dlls/bcrypt/gnutls.c | 34 ++++--
dlls/bcrypt/macos.c | 18 ++-
dlls/bcrypt/unixlib.c | 211 ++++++++++++++++++++++++++++++++++
5 files changed, 253 insertions(+), 16 deletions(-)
dlls/bcrypt/gnutls.c | 32 ++++--
dlls/bcrypt/unixlib.c | 208 ++++++++++++++++++++++++++++++++++
4 files changed, 235 insertions(+), 11 deletions(-)
create mode 100644 dlls/bcrypt/unixlib.c
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index 24803fb2d7c..46a20d473dd 100644
index 63a731fa9d9..6dd3066d4a5 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -11,6 +11,7 @@ C_SRCS = \
macos.c \
@@ -8,6 +8,7 @@ C_SRCS = \
gnutls.c \
md2.c \
sha256.c \
- sha512.c
@@ -39,10 +38,10 @@ index 61c367cae9d..d0697ed807e 100644
+
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 9c1e7b5ab06..9b716c6f536 100644
index 7b1bceda889..66845ffc8cf 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -372,9 +372,12 @@ fail:
@@ -373,9 +373,12 @@ fail:
static void gnutls_uninitialize(void)
{
@@ -58,16 +57,7 @@ index 9c1e7b5ab06..9b716c6f536 100644
}
struct buffer
@@ -1869,7 +1872,7 @@ static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULO
return status;
}
-static const struct key_funcs key_funcs =
+static struct key_funcs key_funcs =
{
key_set_property,
key_symmetric_init,
@@ -1893,19 +1896,28 @@ static const struct key_funcs key_funcs =
@@ -1894,19 +1897,28 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
@@ -103,42 +93,12 @@ index 9c1e7b5ab06..9b716c6f536 100644
+ return NULL;
+}
+#endif
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 20e1a61e3fb..1e364ac05a3 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -302,11 +302,21 @@ static const struct key_funcs key_funcs =
key_import_rsa
};
-NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+struct key_funcs * macos_lib_init( DWORD reason )
{
- if (reason != DLL_PROCESS_ATTACH) return STATUS_SUCCESS;
- *(const struct key_funcs **)ptr_out = &key_funcs;
- return STATUS_SUCCESS;
+ if (reason != DLL_PROCESS_ATTACH) return NULL;
+ return &key_funcs;
}
+#else
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "winternl.h"
+
+struct key_funcs * macos_lib_init( DWORD reason )
+{
+ return NULL;
+}
#endif
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
new file mode 100644
index 00000000000..6c3aff80373
index 00000000000..1937a8172a4
--- /dev/null
+++ b/dlls/bcrypt/unixlib.c
@@ -0,0 +1,211 @@
@@ -0,0 +1,208 @@
+#if 0
+#pragma makedep unix
+#endif
@@ -271,7 +231,7 @@ index 00000000000..6c3aff80373
+}
+
+static NTSTATUS CDECL key_asymmetric_decrypt( struct key *key, UCHAR *input, ULONG input_len,
+ UCHAR *output, ULONG *output_len, ULONG *ret_len )
+ UCHAR *output, ULONG output_len, ULONG *ret)
+{
+ FIXME( "not implemented\n" );
+ return STATUS_NOT_IMPLEMENTED;
@@ -310,13 +270,10 @@ index 00000000000..6c3aff80373
+NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
+{
+ struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
+ struct key_funcs *macos_funcs = macos_lib_init(reason);
+
+ if (reason == DLL_PROCESS_ATTACH)
+ {
+#define RESOLVE_FUNC(name) \
+ if (macos_funcs && macos_funcs->key_##name) \
+ key_funcs.key_##name = macos_funcs->key_##name; \
+ if (gnutls_funcs && gnutls_funcs->key_##name) \
+ key_funcs.key_##name = gnutls_funcs->key_##name;
+
@@ -351,5 +308,5 @@ index 00000000000..6c3aff80373
+
+#endif
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From e2442f39015a5982bfd15479ee06d7163d36771d Mon Sep 17 00:00:00 2001
From 528d7188ba7d6e68622d1b4f95608e68f26e1852 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 2 Oct 2020 12:11:49 -0500
Subject: [PATCH] bcrypt: Implement BCryptSecretAgreement with libgcrypt.
@@ -11,17 +11,16 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
dlls/bcrypt/bcrypt_main.c | 55 ++++++-
dlls/bcrypt/gcrypt.c | 292 ++++++++++++++++++++++++++++++++++
dlls/bcrypt/gnutls.c | 3 +-
dlls/bcrypt/macos.c | 3 +-
dlls/bcrypt/tests/bcrypt.c | 2 +-
dlls/bcrypt/unixlib.c | 13 +-
9 files changed, 378 insertions(+), 9 deletions(-)
8 files changed, 376 insertions(+), 8 deletions(-)
create mode 100644 dlls/bcrypt/gcrypt.c
diff --git a/configure.ac b/configure.ac
index b6b8d49342f3..7c1c8a7ddaf4 100644
index f2401734035..b47f8d016e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
@@ -47,6 +47,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]))
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -29,7 +28,7 @@ index b6b8d49342f3..7c1c8a7ddaf4 100644
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]),
[if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi])
@@ -1989,6 +1990,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
@@ -1954,6 +1955,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"],
[vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.])
test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no}
@@ -50,22 +49,22 @@ index b6b8d49342f3..7c1c8a7ddaf4 100644
AC_SUBST(EXTRACFLAGS,"")
diff --git a/dlls/bcrypt/Makefile.in b/dlls/bcrypt/Makefile.in
index 46a20d473dd7..4a3016784af3 100644
index 6dd3066d4a5..5336c8fc66b 100644
--- a/dlls/bcrypt/Makefile.in
+++ b/dlls/bcrypt/Makefile.in
@@ -7,6 +7,7 @@ EXTRADLLFLAGS = -mno-cygwin
@@ -5,6 +5,7 @@ EXTRAINCL = $(GNUTLS_CFLAGS)
C_SRCS = \
bcrypt_main.c \
+ gcrypt.c \
gnutls.c \
macos.c \
md2.c \
sha256.c \
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
index 3c7110d05f84..e7991eac077a 100644
index d0697ed807e..66898c58cd2 100644
--- a/dlls/bcrypt/bcrypt_internal.h
+++ b/dlls/bcrypt/bcrypt_internal.h
@@ -192,6 +192,8 @@ struct key
@@ -193,6 +193,8 @@ struct key
struct secret
{
struct object hdr;
@@ -74,7 +73,7 @@ index 3c7110d05f84..e7991eac077a 100644
};
struct key_funcs
@@ -216,9 +218,11 @@ struct key_funcs
@@ -217,9 +219,11 @@ struct key_funcs
NTSTATUS (CDECL *key_import_dsa_capi)( struct key *, UCHAR *, ULONG );
NTSTATUS (CDECL *key_import_ecc)( struct key *, UCHAR *, ULONG );
NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG );
@@ -87,10 +86,10 @@ index 3c7110d05f84..e7991eac077a 100644
#endif /* __BCRYPT_INTERNAL_H */
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
index a1423dcd8368..0655c5dcfe81 100644
index 5eb50cd616b..570f452d78e 100644
--- a/dlls/bcrypt/bcrypt_main.c
+++ b/dlls/bcrypt/bcrypt_main.c
@@ -1932,9 +1932,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
@@ -1925,9 +1925,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
{
struct key *privkey = privatekey;
struct key *pubkey = publickey;
@@ -104,7 +103,7 @@ index a1423dcd8368..0655c5dcfe81 100644
if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
@@ -1943,18 +1946,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
@@ -1936,18 +1939,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
if (!(secret = heap_alloc_zero( sizeof(*secret) ))) return STATUS_NO_MEMORY;
secret->hdr.magic = MAGIC_SECRET;
@@ -146,7 +145,7 @@ index a1423dcd8368..0655c5dcfe81 100644
heap_free( secret );
return STATUS_SUCCESS;
}
@@ -1964,12 +1988,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
@@ -1957,12 +1981,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
{
struct secret *secret = handle;
@@ -184,7 +183,7 @@ index a1423dcd8368..0655c5dcfe81 100644
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
diff --git a/dlls/bcrypt/gcrypt.c b/dlls/bcrypt/gcrypt.c
new file mode 100644
index 000000000000..e72c27feb519
index 00000000000..e72c27feb51
--- /dev/null
+++ b/dlls/bcrypt/gcrypt.c
@@ -0,0 +1,292 @@
@@ -481,10 +480,10 @@ index 000000000000..e72c27feb519
+}
+#endif
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index 9490ea8612a8..78d0f2d95966 100644
index 66845ffc8cf..64825f5b99b 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -1949,7 +1949,8 @@ static const struct key_funcs key_funcs =
@@ -1894,7 +1894,8 @@ static const struct key_funcs key_funcs =
key_export_ecc,
key_import_dsa_capi,
key_import_ecc,
@@ -494,25 +493,11 @@ index 9490ea8612a8..78d0f2d95966 100644
};
struct key_funcs * gnutls_lib_init( DWORD reason )
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
index 2a88aec8362c..3ee3515f9de2 100644
--- a/dlls/bcrypt/macos.c
+++ b/dlls/bcrypt/macos.c
@@ -299,7 +299,8 @@ static const struct key_funcs key_funcs =
key_export_ecc,
key_import_dsa_capi,
key_import_ecc,
- key_import_rsa
+ key_import_rsa,
+ NULL
};
struct key_funcs * macos_lib_init( DWORD reason )
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
index 456727d04a96..6be406dee21f 100644
index fb5ac03b039..894473d5346 100644
--- a/dlls/bcrypt/tests/bcrypt.c
+++ b/dlls/bcrypt/tests/bcrypt.c
@@ -2163,7 +2163,7 @@ static void test_ECDH(void)
@@ -2248,7 +2248,7 @@ static void test_ECDH(void)
goto raw_secret_end;
}
@@ -522,7 +507,7 @@ index 456727d04a96..6be406dee21f 100644
if (status != STATUS_SUCCESS)
{
diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c
index 9cbb25f5740c..6f8ff7f97887 100644
index 1937a8172a4..e684a608eb5 100644
--- a/dlls/bcrypt/unixlib.c
+++ b/dlls/bcrypt/unixlib.c
@@ -142,6 +142,12 @@ static NTSTATUS CDECL key_import_rsa( struct key *key, UCHAR *input, ULONG input
@@ -538,7 +523,7 @@ index 9cbb25f5740c..6f8ff7f97887 100644
static struct key_funcs key_funcs =
{
key_set_property,
@@ -164,12 +170,14 @@ static struct key_funcs key_funcs =
@@ -164,17 +170,21 @@ static struct key_funcs key_funcs =
key_import_dsa_capi,
key_import_ecc,
key_import_rsa,
@@ -548,14 +533,11 @@ index 9cbb25f5740c..6f8ff7f97887 100644
NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out )
{
struct key_funcs *gnutls_funcs = gnutls_lib_init(reason);
struct key_funcs *macos_funcs = macos_lib_init(reason);
+ struct key_funcs *gcrypt_funcs = gcrypt_lib_init(reason);
if (reason == DLL_PROCESS_ATTACH)
{
@@ -177,7 +185,9 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
if (macos_funcs && macos_funcs->key_##name) \
key_funcs.key_##name = macos_funcs->key_##name; \
#define RESOLVE_FUNC(name) \
if (gnutls_funcs && gnutls_funcs->key_##name) \
- key_funcs.key_##name = gnutls_funcs->key_##name;
+ key_funcs.key_##name = gnutls_funcs->key_##name; \
@@ -564,7 +546,7 @@ index 9cbb25f5740c..6f8ff7f97887 100644
RESOLVE_FUNC(set_property)
RESOLVE_FUNC(symmetric_init)
@@ -199,6 +209,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
@@ -196,6 +206,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p
RESOLVE_FUNC(import_dsa_capi)
RESOLVE_FUNC(import_ecc)
RESOLVE_FUNC(import_rsa)
@@ -573,5 +555,5 @@ index 9cbb25f5740c..6f8ff7f97887 100644
#undef RESOLVE_FUNC
--
2.29.2
2.33.0

View File

@@ -2,3 +2,5 @@ Fixes: [47699] Multiple games fail to connect to online services (missing BCrypt
# Needs to be moved to the unix lib, but that's a nontrivial amount of work, and
# using gcrypt is the wrong way forward (we should expose the missing APIs from
# gnutls instead).
# Temporarily disabled pending a rebase from author.
Disabled: true

View File

@@ -1,4 +1,4 @@
From 7d5631535b26bea474584a75254da6d91e623e4f Mon Sep 17 00:00:00 2001
From 58773ad5cf6a79a6ec4fc2856aeb5fdf3f877368 Mon Sep 17 00:00:00 2001
From: Andrew Church <achurch@achurch.org>
Date: Mon, 25 Feb 2019 11:21:03 +1100
Subject: [PATCH] dinput: Allow remapping of joystick buttons
@@ -18,10 +18,10 @@ Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=35815
5 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index d4f5b819471..e1fc80f41bf 100644
index c85fda5cddb..21c81b0b683 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -883,6 +883,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -921,6 +921,7 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
int tokens = 0;
int axis = 0;
int pov = 0;
@@ -29,7 +29,7 @@ index d4f5b819471..e1fc80f41bf 100644
get_app_key(&hkey, &appkey);
@@ -894,6 +895,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
@@ -932,6 +933,34 @@ HRESULT setup_dinput_options(JoystickGenericImpl *This, const int *default_axis_
TRACE("setting default deadzone to: \"%s\" %d\n", buffer, This->deadzone);
}
@@ -65,7 +65,7 @@ index d4f5b819471..e1fc80f41bf 100644
if (!This->axis_map) return DIERR_OUTOFMEMORY;
diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c
index c439cca81c3..d1194197f66 100644
index 5b54e352c20..7a7a59bcb58 100644
--- a/dlls/dinput/joystick_linux.c
+++ b/dlls/dinput/joystick_linux.c
@@ -735,10 +735,13 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -85,10 +85,10 @@ index c439cca81c3..d1194197f66 100644
else if (jse.type & JS_EVENT_AXIS)
{
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c
index 8279ffbf74a..a6a658ac57b 100644
index e3876a97b7f..aa56aa28d08 100644
--- a/dlls/dinput/joystick_linuxinput.c
+++ b/dlls/dinput/joystick_linuxinput.c
@@ -742,6 +742,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
@@ -820,6 +820,8 @@ static void joy_polldev( IDirectInputDevice8W *iface )
if (btn & 0x80)
{
btn &= 0x7F;
@@ -98,11 +98,11 @@ index 8279ffbf74a..a6a658ac57b 100644
This->generic.js.rgbButtons[btn] = value = ie.value ? 0x80 : 0x00;
}
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index e8732bd696c..866df41c392 100644
index 9ee45e8a445..f88ee566781 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -838,6 +838,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
TRACE("valueRef %s val %d oldVal %d newVal %d\n", debugstr_cf(valueRef), val, oldVal, newVal);
@@ -891,6 +891,8 @@ static void poll_osx_device_state( IDirectInputDevice8W *iface )
TRACE("val %d oldVal %d newVal %d\n", val, oldVal, newVal);
if (oldVal != newVal)
{
+ button_idx = device->generic.button_map[button_idx];
@@ -111,7 +111,7 @@ index e8732bd696c..866df41c392 100644
queue_event(iface,inst_id,newVal,GetCurrentTime(),device->generic.base.dinput->evsequence++);
if (device->generic.base.hEvent)
diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h
index 4fe51d17067..01b35fa40fc 100644
index 32265edef03..fb0edfa7878 100644
--- a/dlls/dinput/joystick_private.h
+++ b/dlls/dinput/joystick_private.h
@@ -33,6 +33,9 @@

View File

@@ -1,4 +1,4 @@
From 4d8244be2c89fe601d75bd17631d87f504dcd63a Mon Sep 17 00:00:00 2001
From d6b29a6153e786ff7a79bdbb7c33977e19c6e267 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 13 Jun 2018 10:44:49 -0500
Subject: [PATCH] configure: Check for sys/eventfd.h, ppoll(), and shm_open().
@@ -13,10 +13,10 @@ Although perhaps we shouldn't since the server doesn't do this.
3 files changed, 89 insertions(+)
diff --git a/configure b/configure
index 97b5dcfb38b..367008886d7 100755
index ec425d91f63..200b42b7fe7 100755
--- a/configure
+++ b/configure
@@ -7543,6 +7543,7 @@ for ac_header in \
@@ -7525,6 +7525,7 @@ for ac_header in \
sys/cdio.h \
sys/epoll.h \
sys/event.h \
@@ -24,15 +24,15 @@ index 97b5dcfb38b..367008886d7 100755
sys/filio.h \
sys/ioctl.h \
sys/ipc.h \
@@ -18009,6 +18010,7 @@ for ac_func in \
@@ -17912,6 +17913,7 @@ for ac_func in \
port_create \
posix_fadvise \
posix_fallocate \
+ ppoll \
prctl \
proc_pidinfo \
readlink \
@@ -18402,6 +18404,72 @@ fi
setproctitle \
@@ -18255,6 +18257,72 @@ fi
;;
esac
@@ -106,10 +106,10 @@ index 97b5dcfb38b..367008886d7 100755
then
if ${LDAP_CFLAGS:+false} :; then :
diff --git a/configure.ac b/configure.ac
index 0e65c78a81d..a3c9a627117 100644
index 718ab1ca50e..d5f82ad2af4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -510,6 +510,7 @@ AC_CHECK_HEADERS(\
@@ -496,6 +496,7 @@ AC_CHECK_HEADERS(\
sys/cdio.h \
sys/epoll.h \
sys/event.h \
@@ -117,15 +117,15 @@ index 0e65c78a81d..a3c9a627117 100644
sys/filio.h \
sys/ioctl.h \
sys/ipc.h \
@@ -2212,6 +2213,7 @@ AC_CHECK_FUNCS(\
@@ -2158,6 +2159,7 @@ AC_CHECK_FUNCS(\
port_create \
posix_fadvise \
posix_fallocate \
+ ppoll \
prctl \
proc_pidinfo \
readlink \
@@ -2262,6 +2264,16 @@ case $host_os in
renameat \
@@ -2199,6 +2201,16 @@ case $host_os in
;;
esac
@@ -143,10 +143,10 @@ index 0e65c78a81d..a3c9a627117 100644
if test "x$with_ldap" != "xno"
then
diff --git a/include/config.h.in b/include/config.h.in
index f66444fd715..bf8fc85e6c5 100644
index e975ca8a55d..a19789dad8c 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -507,6 +507,9 @@
@@ -474,6 +474,9 @@
/* Define to 1 if you have the `posix_fallocate' function. */
#undef HAVE_POSIX_FALLOCATE
@@ -156,7 +156,7 @@ index f66444fd715..bf8fc85e6c5 100644
/* Define to 1 if you have the `prctl' function. */
#undef HAVE_PRCTL
@@ -585,6 +588,9 @@
@@ -546,6 +549,9 @@
/* Define to 1 if `interface_id' is a member of `sg_io_hdr_t'. */
#undef HAVE_SG_IO_HDR_T_INTERFACE_ID
@@ -166,7 +166,7 @@ index f66444fd715..bf8fc85e6c5 100644
/* Define if sigaddset is supported */
#undef HAVE_SIGADDSET
@@ -749,6 +755,9 @@
@@ -695,6 +701,9 @@
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H

View File

@@ -1,4 +1,4 @@
From 402e89a3813766ac3ba38525b52e9c5a42a92eee Mon Sep 17 00:00:00 2001
From b569bf796e685232a6858b1daa2950408c422adf Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 6 Jul 2020 12:09:22 -0500
Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
@@ -16,7 +16,7 @@ Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores.
create mode 100644 dlls/ntdll/unix/esync.h
diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in
index 6dfe2eb12f9..d86dafbddf9 100644
index aac7f8eead7..7ea80f19481 100644
--- a/dlls/ntdll/Makefile.in
+++ b/dlls/ntdll/Makefile.in
@@ -45,6 +45,7 @@ C_SRCS = \
@@ -348,7 +348,7 @@ index 00000000000..a50a755149a
+
+extern int receive_fd( obj_handle_t *handle ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 1830c4fb392..8ae1a7548bf 100644
index dfc0d4c9a09..310556948aa 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -86,6 +86,7 @@
@@ -359,7 +359,7 @@ index 1830c4fb392..8ae1a7548bf 100644
#include "wine/list.h"
#include "wine/debug.h"
@@ -1867,6 +1868,7 @@ static void start_main_thread(void)
@@ -2190,6 +2191,7 @@ static void start_main_thread(void)
signal_init_thread( teb );
dbg_init();
startup_info_size = server_init_process();
@@ -368,7 +368,7 @@ index 1830c4fb392..8ae1a7548bf 100644
init_cpu_info();
init_files();
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index cec2ef250a3..a5e9eff6f96 100644
index 53d34e1858a..43b470fc10a 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -114,7 +114,7 @@ timeout_t server_start_time = 0; /* time of server startup */
@@ -380,7 +380,7 @@ index cec2ef250a3..a5e9eff6f96 100644
/* atomically exchange a 64-bit value */
static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val )
@@ -821,7 +821,7 @@ void wine_server_send_fd( int fd )
@@ -828,7 +828,7 @@ void wine_server_send_fd( int fd )
*
* Receive a file descriptor passed from the server.
*/
@@ -390,18 +390,18 @@ index cec2ef250a3..a5e9eff6f96 100644
struct iovec vec;
struct msghdr msghdr;
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 16635ee42fa..2c795ea5ee8 100644
index 86a836a908f..871fe7fb42e 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -72,6 +72,7 @@
#include "wine/exception.h"
@@ -71,6 +71,7 @@
#include "wine/server.h"
#include "wine/debug.h"
#include "unix_private.h"
+#include "esync.h"
WINE_DEFAULT_DEBUG_CHANNEL(sync);
@@ -322,6 +323,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
@@ -324,6 +325,9 @@ NTSTATUS WINAPI NtCreateSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJ
if (max <= 0 || initial < 0 || initial > max) return STATUS_INVALID_PARAMETER;
if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret;
@@ -424,5 +424,5 @@ index a571855c70a..e41bbbf9349 100644
int do_esync(void)
{
--
2.30.2
2.33.0

View File

@@ -1,4 +1,4 @@
From e26a5fd9e3b44cbee2919398233739d985274638 Mon Sep 17 00:00:00 2001
From dc2aaa6a25ebccc30c7903fa68235d5971f8d6b8 Mon Sep 17 00:00:00 2001
From: Daniel Wendt <daniel.wendt@linux.com>
Date: Fri, 15 Nov 2013 12:52:37 +0100
Subject: [PATCH] gdi32: fix for rotated Arc, ArcTo, Chord and Pie drawing
@@ -6,22 +6,21 @@ Subject: [PATCH] gdi32: fix for rotated Arc, ArcTo, Chord and Pie drawing
Wine-Bug: http://bugs.winehq.org/show_bug.cgi?id=34579
---
dlls/gdi32/dibdrv/graphics.c | 80 ++++++++++++++++++++++++++++++++++++
dlls/gdi32/gdi_private.h | 3 ++
2 files changed, 83 insertions(+)
dlls/win32u/dibdrv/graphics.c | 80 +++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c
index 9ebcaf7e4a3..c4456a76e77 100644
--- a/dlls/gdi32/dibdrv/graphics.c
+++ b/dlls/gdi32/dibdrv/graphics.c
@@ -312,6 +312,60 @@ static int get_arc_points( int arc_dir, const RECT *rect, POINT start, POINT end
diff --git a/dlls/win32u/dibdrv/graphics.c b/dlls/win32u/dibdrv/graphics.c
index 410f29e8f19..3a6f8184009 100644
--- a/dlls/win32u/dibdrv/graphics.c
+++ b/dlls/win32u/dibdrv/graphics.c
@@ -310,6 +310,60 @@ static int get_arc_points( int arc_dir, const RECT *rect, POINT start, POINT end
return pos - count;
}
+/*
+ Check if matrix has uniform scale and shear and contains a rotation.
+*/
+BOOL xform_has_rotate_and_uniform_scale_and_shear( const XFORM *xform )
+static BOOL xform_has_rotate_and_uniform_scale_and_shear( const XFORM *xform )
+{
+ return xform->eM21 != 0 && xform->eM11 == xform->eM22 && -xform->eM21 == xform->eM12;
+}
@@ -35,7 +34,7 @@ index 9ebcaf7e4a3..c4456a76e77 100644
+ which has to be checked by a call to xform_has_rotate_and_uniform_scale_and_shear().
+ Hints how to get unique values for non-uniform matrixes are welcome.
+*/
+BOOL xform_decompose_rotation_and_translation( XFORM *xform, XFORM *rotation_and_translation )
+static BOOL xform_decompose_rotation_and_translation( XFORM *xform, XFORM *rotation_and_translation )
+{
+ XFORM inverse_matrix_scale;
+ XFORM origin_matrix = *xform;
@@ -75,22 +74,22 @@ index 9ebcaf7e4a3..c4456a76e77 100644
/* backend for arc functions; extra_lines is -1 for ArcTo, 0 for Arc, 1 for Chord, 2 for Pie */
static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT start_x, INT start_y, INT end_x, INT end_y, INT extra_lines )
@@ -324,6 +378,22 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
@@ -322,6 +376,22 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
BOOL ret = TRUE;
HRGN outline = 0, interior = 0;
+ BOOL exclude_rotation = FALSE;
+ XFORM old;
+ XFORM rotation_and_translation;
+ if (GetGraphicsMode( pdev->dev.hdc ) == GM_ADVANCED)
+ if (dc->attr->graphics_mode == GM_ADVANCED)
+ {
+ XFORM xf;
+ GetWorldTransform( pdev->dev.hdc, &old );
+ NtGdiGetTransform( pdev->dev.hdc, 0x203, &old );
+ xf = old;
+ if (xform_has_rotate_and_uniform_scale_and_shear( &xf ) &&
+ xform_decompose_rotation_and_translation( &xf, &rotation_and_translation ))
+ {
+ SetWorldTransform( pdev->dev.hdc, &xf );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &xf, MWT_SET );
+ exclude_rotation = TRUE;
+ }
+ }
@@ -98,35 +97,23 @@ index 9ebcaf7e4a3..c4456a76e77 100644
if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE;
width = rect.right - rect.left;
@@ -357,6 +427,16 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
@@ -355,6 +425,16 @@ static BOOL draw_arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
points[count].y = rect.top + height / 2;
count++;
}
+
+ if (exclude_rotation == TRUE)
+ {
+ SetWorldTransform( pdev->dev.hdc, &rotation_and_translation );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &rotation_and_translation, MWT_SET );
+ /* apply rotation and translation to calculated points */
+ LPtoDP( dev->hdc, points, count );
+ NtGdiTransformPoints( dev->hdc, points, points, count, NtGdiLPtoDP );
+ /* restore origin matrix */
+ SetWorldTransform( pdev->dev.hdc, &old );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &old, MWT_SET );
+ }
+
if (count < 2)
{
HeapFree( GetProcessHeap(), 0, points );
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
index 9f092913110..8dbf2772555 100644
--- a/dlls/gdi32/gdi_private.h
+++ b/dlls/gdi32/gdi_private.h
@@ -303,4 +303,7 @@ static inline int get_dib_info_size( const BITMAPINFO *info, UINT coloruse )
extern HMODULE gdi32_module DECLSPEC_HIDDEN;
+BOOL xform_has_rotate_and_uniform_scale_and_shear( const XFORM *xform ) DECLSPEC_HIDDEN;
+BOOL xform_decompose_rotation_and_translation( XFORM *xform, XFORM *rotation_and_translation ) DECLSPEC_HIDDEN;
+
#endif /* __WINE_GDI_PRIVATE_H */
free( points );
--
2.33.0

View File

@@ -1,17 +1,17 @@
From 017514cff847b53d409bf5c8735c30d26474ed8f Mon Sep 17 00:00:00 2001
From 5dcb80fe0d35101804bb978e507e6db361a949af Mon Sep 17 00:00:00 2001
From: Daniel Wendt <daniel.wendt@linux.com>
Date: Tue, 10 Dec 2013 14:55:32 +0100
Subject: [PATCH] gdi32: fix for rotated ellipse
Bug: http://bugs.winehq.org/show_bug.cgi?id=35331
---
dlls/gdi32/dibdrv/graphics.c | 60 +++++++++++++++++++++++++-----------
dlls/win32u/dibdrv/graphics.c | 60 ++++++++++++++++++++++++-----------
1 file changed, 42 insertions(+), 18 deletions(-)
diff --git a/dlls/gdi32/dibdrv/graphics.c b/dlls/gdi32/dibdrv/graphics.c
index da9144f0862..6a0519644f4 100644
--- a/dlls/gdi32/dibdrv/graphics.c
+++ b/dlls/gdi32/dibdrv/graphics.c
diff --git a/dlls/win32u/dibdrv/graphics.c b/dlls/win32u/dibdrv/graphics.c
index 3a6f8184009..b5231636261 100644
--- a/dlls/win32u/dibdrv/graphics.c
+++ b/dlls/win32u/dibdrv/graphics.c
@@ -1535,6 +1535,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
BOOL ret = TRUE;
HRGN outline = 0, interior = 0;
@@ -20,15 +20,15 @@ index da9144f0862..6a0519644f4 100644
+ XFORM old;
+ XFORM rotation_and_translation;
+
+ if (GetGraphicsMode( pdev->dev.hdc ) == GM_ADVANCED)
+ if (dc->attr->graphics_mode == GM_ADVANCED)
+ {
+ XFORM xf;
+ GetWorldTransform( pdev->dev.hdc, &old );
+ NtGdiGetTransform( pdev->dev.hdc, 0x203, &old );
+ xf = old;
+ if (xform_has_rotate_and_uniform_scale_and_shear( &xf ) &&
+ xform_decompose_rotation_and_translation( &xf, &rotation_and_translation ))
+ {
+ SetWorldTransform( pdev->dev.hdc, &xf );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &xf, MWT_SET );
+ exclude_rotation_translation = TRUE;
+ }
+ }
@@ -44,7 +44,7 @@ index da9144f0862..6a0519644f4 100644
- !(interior = NtGdiCreateRoundRectRgn( rect.left, rect.top, rect.right + 1, rect.bottom + 1,
- ellipse_width, ellipse_height )))
- {
- HeapFree( GetProcessHeap(), 0, points );
- free( points );
- if (outline) NtGdiDeleteObjectApp( outline );
- return FALSE;
- }
@@ -66,17 +66,17 @@ index da9144f0862..6a0519644f4 100644
+ if (exclude_rotation_translation == TRUE)
+ {
+ SetWorldTransform( pdev->dev.hdc, &rotation_and_translation );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &rotation_and_translation, MWT_SET );
+ /* apply rotation and translation to calculated points */
+ LPtoDP( dev->hdc, points, count );
+ NtGdiTransformPoints( dev->hdc, points, points, count, NtGdiLPtoDP );
+ /* restore origin matrix */
+ SetWorldTransform( pdev->dev.hdc, &old );
+ NtGdiModifyWorldTransform( pdev->dev.hdc, &old, MWT_SET );
+ }
+
+ if (pdev->brush.style != BS_NULL &&
+ !(interior = CreatePolygonRgn(points, count, ALTERNATE)))
+ !(interior = NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn )))
+ {
+ HeapFree( GetProcessHeap(), 0, points );
+ free( points );
+ if (outline) NtGdiDeleteObjectApp( outline );
+ return FALSE;
+ }

View File

@@ -1 +1,2 @@
Fixes: [8332] Fallback to system ping command when CAP_NET_RAW is not available
Disabled: True

View File

@@ -0,0 +1,168 @@
From 2c3d9dfc09ee64767347574e0bd6e8f5511a6a54 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 9 Oct 2021 13:47:39 +1100
Subject: [PATCH 02/22] Revert "wmvcore: Move the async reader implementation
to winegstreamer."
This reverts commit bf7c05d87a65b7b9999d71fc0df602e3dfa2fafa.
---
dlls/winegstreamer/Makefile.in | 1 -
dlls/winegstreamer/winegstreamer.spec | 1 -
dlls/wmvcore/Makefile.in | 1 +
.../wm_asyncreader.c => wmvcore/reader.c} | 54 +++++++++++--------
dlls/wmvcore/wmvcore_main.c | 15 ------
5 files changed, 32 insertions(+), 40 deletions(-)
rename dlls/{winegstreamer/wm_asyncreader.c => wmvcore/reader.c} (98%)
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 17311cd663c..671e3bcb7ba 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -13,7 +13,6 @@ C_SRCS = \
mfplat.c \
quartz_parser.c \
wg_parser.c \
- wm_asyncreader.c \
wm_syncreader.c
IDL_SRCS = \
diff --git a/dlls/winegstreamer/winegstreamer.spec b/dlls/winegstreamer/winegstreamer.spec
index bc6a390f8b1..bd9f53a7445 100644
--- a/dlls/winegstreamer/winegstreamer.spec
+++ b/dlls/winegstreamer/winegstreamer.spec
@@ -2,5 +2,4 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
-@ stdcall winegstreamer_create_wm_async_reader(ptr)
@ stdcall winegstreamer_create_wm_sync_reader(ptr)
diff --git a/dlls/wmvcore/Makefile.in b/dlls/wmvcore/Makefile.in
index 6aed828abae..d0b230dd7c0 100644
--- a/dlls/wmvcore/Makefile.in
+++ b/dlls/wmvcore/Makefile.in
@@ -6,6 +6,7 @@ DELAYIMPORTS = winegstreamer
EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \
+ reader.c \
wmvcore_main.c \
writer.c
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/wmvcore/reader.c
similarity index 98%
rename from dlls/winegstreamer/wm_asyncreader.c
rename to dlls/wmvcore/reader.c
index d3fd1624f24..12ba8099ab1 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/wmvcore/reader.c
@@ -16,8 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "gst_private.h"
+#include "wmvcore.h"
+
#include "wmsdk.h"
+#include "wine/debug.h"
+#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
@@ -150,7 +153,7 @@ static ULONG WINAPI WMReader_Release(IWMReader *iface)
TRACE("(%p) ref=%d\n", This, ref);
if(!ref)
- free(This);
+ heap_free(This);
return ref;
}
@@ -2036,31 +2039,36 @@ static const IWMPacketSize2Vtbl WMPacketSize2Vtbl =
packetsize_SetMinPacketSize
};
-HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader)
+HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **ret_reader)
{
- WMReader *object;
+ WMReader *reader;
- TRACE("reader %p.\n", reader);
+ TRACE("(%p, %x, %p)\n", reserved, rights, ret_reader);
- if (!(object = calloc(1, sizeof(*object))))
+ reader = heap_alloc(sizeof(*reader));
+ if(!reader)
return E_OUTOFMEMORY;
- object->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl;
- object->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
- object->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl;
- object->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl;
- object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
- object->IWMReader_iface.lpVtbl = &WMReaderVtbl;
- object->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
- object->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
- object->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
- object->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
- object->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
- object->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
- object->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
- object->ref = 1;
-
- TRACE("Created async reader %p.\n", object);
- *reader = (IWMReader *)&object->IWMReader_iface;
+ reader->IWMReader_iface.lpVtbl = &WMReaderVtbl;
+ reader->IWMReaderAdvanced6_iface.lpVtbl = &WMReaderAdvanced6Vtbl;
+ reader->IWMReaderAccelerator_iface.lpVtbl = &WMReaderAcceleratorVtbl;
+ reader->IWMReaderNetworkConfig2_iface.lpVtbl = &WMReaderNetworkConfig2Vtbl;
+ reader->IWMReaderStreamClock_iface.lpVtbl = &WMReaderStreamClockVtbl;
+ reader->IWMReaderTypeNegotiation_iface.lpVtbl = &WMReaderTypeNegotiationVtbl;
+ reader->IWMReaderTimecode_iface.lpVtbl = &WMReaderTimecodeVtbl;
+ reader->IWMReaderPlaylistBurn_iface.lpVtbl = &WMReaderPlaylistBurnVtbl;
+ reader->IWMHeaderInfo3_iface.lpVtbl = &WMHeaderInfo3Vtbl;
+ reader->IWMLanguageList_iface.lpVtbl = &WMLanguageListVtbl;
+ reader->IReferenceClock_iface.lpVtbl = &ReferenceClockVtbl;
+ reader->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
+ reader->IWMPacketSize2_iface.lpVtbl = &WMPacketSize2Vtbl;
+ reader->ref = 1;
+
+ *ret_reader = &reader->IWMReader_iface;
return S_OK;
}
+
+HRESULT WINAPI WMCreateReaderPriv(IWMReader **ret_reader)
+{
+ return WMCreateReader(NULL, 0, ret_reader);
+}
diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c
index ff837921286..8d4d4251369 100644
--- a/dlls/wmvcore/wmvcore_main.c
+++ b/dlls/wmvcore/wmvcore_main.c
@@ -25,23 +25,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
-HRESULT WINAPI winegstreamer_create_wm_async_reader(IWMReader **reader);
HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader);
-HRESULT WINAPI WMCreateReader(IUnknown *reserved, DWORD rights, IWMReader **reader)
-{
- TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
-
- return winegstreamer_create_wm_async_reader(reader);
-}
-
-HRESULT WINAPI WMCreateReaderPriv(IWMReader **reader)
-{
- TRACE("reader %p.\n", reader);
-
- return winegstreamer_create_wm_async_reader(reader);
-}
-
HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader)
{
TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
--
2.33.0

View File

@@ -0,0 +1,161 @@
From 59b60c9a19de54bc0f6541395ffcf49d96437b8c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 9 Oct 2021 13:47:42 +1100
Subject: [PATCH 04/22] Revert "wmvcore: Move the sync reader implementation to
winegstreamer."
This reverts commit e4767ea6126fce8b419ef10a3cfce8bf43206d6f.
---
dlls/winegstreamer/Makefile.in | 4 +--
dlls/winegstreamer/winegstreamer.spec | 1 -
dlls/wmvcore/Makefile.in | 2 +-
.../wm_syncreader.c => wmvcore/syncreader.c} | 33 ++++++++++++-------
dlls/wmvcore/wmvcore_main.c | 16 ---------
5 files changed, 23 insertions(+), 33 deletions(-)
rename dlls/{winegstreamer/wm_syncreader.c => wmvcore/syncreader.c} (96%)
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in
index 671e3bcb7ba..e35df3cf3f9 100644
--- a/dlls/winegstreamer/Makefile.in
+++ b/dlls/winegstreamer/Makefile.in
@@ -1,6 +1,5 @@
MODULE = winegstreamer.dll
UNIXLIB = winegstreamer.so
-IMPORTLIB = winegstreamer
IMPORTS = strmbase strmiids uuid ole32 mfuuid
DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS)
@@ -12,8 +11,7 @@ C_SRCS = \
media_source.c \
mfplat.c \
quartz_parser.c \
- wg_parser.c \
- wm_syncreader.c
+ wg_parser.c
IDL_SRCS = \
winegstreamer_classes.idl
diff --git a/dlls/winegstreamer/winegstreamer.spec b/dlls/winegstreamer/winegstreamer.spec
index bd9f53a7445..b16365d0c9f 100644
--- a/dlls/winegstreamer/winegstreamer.spec
+++ b/dlls/winegstreamer/winegstreamer.spec
@@ -2,4 +2,3 @@
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
-@ stdcall winegstreamer_create_wm_sync_reader(ptr)
diff --git a/dlls/wmvcore/Makefile.in b/dlls/wmvcore/Makefile.in
index d0b230dd7c0..15c017f86d9 100644
--- a/dlls/wmvcore/Makefile.in
+++ b/dlls/wmvcore/Makefile.in
@@ -1,12 +1,12 @@
MODULE = wmvcore.dll
IMPORTLIB = wmvcore
IMPORTS = kernel32
-DELAYIMPORTS = winegstreamer
EXTRADLLFLAGS = -Wb,--prefer-native
C_SRCS = \
reader.c \
+ syncreader.c \
wmvcore_main.c \
writer.c
diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/wmvcore/syncreader.c
similarity index 96%
rename from dlls/winegstreamer/wm_syncreader.c
rename to dlls/wmvcore/syncreader.c
index 75b8e021148..b245ff20d31 100644
--- a/dlls/winegstreamer/wm_syncreader.c
+++ b/dlls/wmvcore/syncreader.c
@@ -16,9 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "gst_private.h"
-#include "initguid.h"
+#include "wmvcore.h"
+
#include "wmsdk.h"
+#include "wine/debug.h"
+#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
@@ -83,7 +85,7 @@ static ULONG WINAPI WMSyncReader_Release(IWMSyncReader2 *iface)
TRACE("(%p) ref=%d\n", This, ref);
if(!ref)
- free(This);
+ heap_free(This);
return ref;
}
@@ -603,20 +605,27 @@ static const IWMProfile3Vtbl WMProfile3Vtbl =
WMProfile3_GetExpectedPacketCount
};
-HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader)
+HRESULT WINAPI WMCreateSyncReader(IUnknown *pcert, DWORD rights, IWMSyncReader **syncreader)
{
- WMSyncReader *object;
+ WMSyncReader *sync;
+
+ TRACE("(%p, %x, %p)\n", pcert, rights, syncreader);
- TRACE("reader %p.\n", reader);
+ sync = heap_alloc(sizeof(*sync));
- if (!(object = calloc(1, sizeof(*object))))
+ if (!sync)
return E_OUTOFMEMORY;
- object->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
- object->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl;
- object->ref = 1;
+ sync->IWMProfile3_iface.lpVtbl = &WMProfile3Vtbl;
+ sync->IWMSyncReader2_iface.lpVtbl = &WMSyncReader2Vtbl;
+ sync->ref = 1;
+
+ *syncreader = (IWMSyncReader *)&sync->IWMSyncReader2_iface;
- TRACE("Created sync reader %p.\n", object);
- *reader = (IWMSyncReader *)&object->IWMSyncReader2_iface;
return S_OK;
}
+
+HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **syncreader)
+{
+ return WMCreateSyncReader(NULL, 0, syncreader);
+}
diff --git a/dlls/wmvcore/wmvcore_main.c b/dlls/wmvcore/wmvcore_main.c
index 8d4d4251369..5f93fc68e3b 100644
--- a/dlls/wmvcore/wmvcore_main.c
+++ b/dlls/wmvcore/wmvcore_main.c
@@ -25,22 +25,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(wmvcore);
-HRESULT WINAPI winegstreamer_create_wm_sync_reader(IWMSyncReader **reader);
-
-HRESULT WINAPI WMCreateSyncReader(IUnknown *reserved, DWORD rights, IWMSyncReader **reader)
-{
- TRACE("reserved %p, rights %#x, reader %p.\n", reserved, rights, reader);
-
- return winegstreamer_create_wm_sync_reader(reader);
-}
-
-HRESULT WINAPI WMCreateSyncReaderPriv(IWMSyncReader **reader)
-{
- TRACE("reader %p.\n", reader);
-
- return winegstreamer_create_wm_sync_reader(reader);
-}
-
HRESULT WINAPI WMCheckURLExtension(const WCHAR *url)
{
FIXME("(%s): stub\n", wine_dbgstr_w(url));
--
2.33.0

View File

@@ -0,0 +1,30 @@
From 6bde437d76c256778d706da4874a4db2a37e0e3a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 9 Oct 2021 13:47:44 +1100
Subject: [PATCH 05/22] Revert "winegstreamer: Translate
GST_AUDIO_CHANNEL_POSITION_MONO to SPEAKER_FRONT_CENTER."
This reverts commit 009c1d66fa202666f778d7df2bbcc522993935cf.
---
dlls/winegstreamer/wg_parser.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index c3c9051a174..0c23ae6d351 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -159,10 +159,7 @@ static uint32_t wg_channel_position_from_gst(GstAudioChannelPosition position)
SPEAKER_TOP_BACK_CENTER,
};
- if (position == GST_AUDIO_CHANNEL_POSITION_MONO)
- return SPEAKER_FRONT_CENTER;
-
- if (position >= 0 && position < ARRAY_SIZE(position_map))
+ if (position < ARRAY_SIZE(position_map))
return position_map[position];
return 0;
}
--
2.33.0

View File

@@ -0,0 +1,37 @@
From 0cc0b9856041daede1d49ce5ba3bde736edd0a92 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Oct 2021 09:00:38 +1100
Subject: [PATCH 06/22] Revert "winegstreamer: Trace the unfiltered caps in
sink_query_cb()."
This reverts commit fd6315eb8f6809b89b7449f4b9dd01453de32eda.
---
dlls/winegstreamer/wg_parser.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index 0c23ae6d351..9a382cb724c 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -1006,7 +1006,6 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
case GST_QUERY_CAPS:
{
GstCaps *caps, *filter, *temp;
- gchar *str;
gst_query_parse_caps(query, &filter);
@@ -1017,10 +1016,6 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
if (!caps)
return FALSE;
- str = gst_caps_to_string(caps);
- GST_LOG("Stream caps are \"%s\".", str);
- g_free(str);
-
if (filter)
{
temp = gst_caps_intersect(caps, filter);
--
2.33.0

View File

@@ -0,0 +1,33 @@
From dd5d76af94c794f9679c29bec0dc436bfaa78edc Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Oct 2021 09:00:39 +1100
Subject: [PATCH 07/22] Revert "winegstreamer: Avoid seeking past the end of an
IMFByteStream."
This reverts commit 3efb72de5aca01d3d979ce697728e51bc3e99901.
---
dlls/winegstreamer/media_source.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 6ecd345cb73..dab85e4689d 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -639,14 +639,6 @@ static DWORD CALLBACK read_thread(void *arg)
else if (offset + size >= file_size)
size = file_size - offset;
- /* Some IMFByteStreams (including the standard file-based stream) return
- * an error when reading past the file size. */
- if (!size)
- {
- wg_parser_push_data(source->wg_parser, data, 0);
- continue;
- }
-
if (!array_reserve(&data, &buffer_size, size, 1))
{
free(data);
--
2.33.0

View File

@@ -0,0 +1,52 @@
From 9d20d8d508a65ef044a3d903eb2c96e9b4d08429 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Oct 2021 09:00:39 +1100
Subject: [PATCH 08/22] Revert "winegstreamer: Avoid passing a NULL buffer to
wg_parser_push_data() in the case of a zero-length read."
This reverts commit 585acfa04188f85fb9138e57d56dd44b870dca41.
---
dlls/winegstreamer/media_source.c | 7 ++-----
dlls/winegstreamer/quartz_parser.c | 5 +----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index dab85e4689d..703bdd7c57d 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -613,12 +613,9 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct media_source *source = arg;
IMFByteStream *byte_stream = source->byte_stream;
- size_t buffer_size = 4096;
+ size_t buffer_size = 0;
uint64_t file_size;
- void *data;
-
- if (!(data = malloc(buffer_size)))
- return 0;
+ void *data = NULL;
IMFByteStream_GetLength(byte_stream, &file_size);
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index 6d79d2ef129..b6655d5da3c 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -786,12 +786,9 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct parser *filter = arg;
LONGLONG file_size, unused;
- size_t buffer_size = 4096;
+ size_t buffer_size = 0;
void *data = NULL;
- if (!(data = malloc(buffer_size)))
- return 0;
-
IAsyncReader_Length(filter->reader, &file_size, &unused);
TRACE("Starting read thread for filter %p.\n", filter);
--
2.33.0

View File

@@ -0,0 +1,122 @@
From 997978816252d56a53b53d8d0a1913f78b3aad42 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Oct 2021 09:00:40 +1100
Subject: [PATCH 09/22] Revert "winegstreamer: Use array_reserve() to
reallocate read buffers."
This reverts commit 59997c355fdc9cb5857c767b3bf16c9513b3d1f3.
---
dlls/winegstreamer/gst_private.h | 2 --
dlls/winegstreamer/main.c | 27 ---------------------------
dlls/winegstreamer/media_source.c | 8 ++++----
dlls/winegstreamer/quartz_parser.c | 8 ++++----
4 files changed, 8 insertions(+), 37 deletions(-)
diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
index 986c8ca695d..ebe0bf6f50d 100644
--- a/dlls/winegstreamer/gst_private.h
+++ b/dlls/winegstreamer/gst_private.h
@@ -38,8 +38,6 @@
#include "unixlib.h"
-bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size) DECLSPEC_HIDDEN;
-
static inline const char *debugstr_time(REFERENCE_TIME time)
{
ULONGLONG abstime = time >= 0 ? time : -time;
diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c
index d6f19fb4ad1..c799aa06d1b 100644
--- a/dlls/winegstreamer/main.c
+++ b/dlls/winegstreamer/main.c
@@ -31,33 +31,6 @@ static unixlib_handle_t unix_handle;
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
-bool array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
-{
- unsigned int new_capacity, max_capacity;
- void *new_elements;
-
- if (count <= *capacity)
- return TRUE;
-
- max_capacity = ~(SIZE_T)0 / size;
- if (count > max_capacity)
- return FALSE;
-
- new_capacity = max(4, *capacity);
- while (new_capacity < count && new_capacity <= max_capacity / 2)
- new_capacity *= 2;
- if (new_capacity < count)
- new_capacity = max_capacity;
-
- if (!(new_elements = realloc(*elements, new_capacity * size)))
- return FALSE;
-
- *elements = new_elements;
- *capacity = new_capacity;
-
- return TRUE;
-}
-
struct wg_parser *wg_parser_create(enum wg_parser_type type, bool unlimited_buffering)
{
struct wg_parser_create_params params =
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
index 703bdd7c57d..da898f20f66 100644
--- a/dlls/winegstreamer/media_source.c
+++ b/dlls/winegstreamer/media_source.c
@@ -613,7 +613,7 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct media_source *source = arg;
IMFByteStream *byte_stream = source->byte_stream;
- size_t buffer_size = 0;
+ uint32_t buffer_size = 0;
uint64_t file_size;
void *data = NULL;
@@ -636,10 +636,10 @@ static DWORD CALLBACK read_thread(void *arg)
else if (offset + size >= file_size)
size = file_size - offset;
- if (!array_reserve(&data, &buffer_size, size, 1))
+ if (size > buffer_size)
{
- free(data);
- return 0;
+ buffer_size = size;
+ data = realloc(data, size);
}
ret_size = 0;
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
index b6655d5da3c..6ae1a99a14a 100644
--- a/dlls/winegstreamer/quartz_parser.c
+++ b/dlls/winegstreamer/quartz_parser.c
@@ -786,7 +786,7 @@ static DWORD CALLBACK read_thread(void *arg)
{
struct parser *filter = arg;
LONGLONG file_size, unused;
- size_t buffer_size = 0;
+ uint32_t buffer_size = 0;
void *data = NULL;
IAsyncReader_Length(filter->reader, &file_size, &unused);
@@ -807,10 +807,10 @@ static DWORD CALLBACK read_thread(void *arg)
else if (offset + size >= file_size)
size = file_size - offset;
- if (!array_reserve(&data, &buffer_size, size, 1))
+ if (size > buffer_size)
{
- free(data);
- return 0;
+ buffer_size = size;
+ data = realloc(data, size);
}
hr = IAsyncReader_SyncRead(filter->reader, offset, size, data);
--
2.33.0

View File

@@ -0,0 +1,44 @@
From 6e82f802820e9ed145201091cd636f2e83d85e67 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Oct 2021 09:00:41 +1100
Subject: [PATCH 10/22] Revert "winegstreamer: Handle zero-length reads in
src_getrange_cb()."
This reverts commit 8e9d7b031f7b0c93471cfbffe8f720c34623a273.
---
dlls/winegstreamer/wg_parser.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index 9a382cb724c..72dfab8f3d6 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -1272,7 +1272,7 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
GstMapInfo map_info;
bool ret;
- GST_LOG("pad %p, offset %" G_GINT64_MODIFIER "u, size %u, buffer %p.", pad, offset, size, *buffer);
+ GST_LOG("pad %p, offset %" G_GINT64_MODIFIER "u, length %u, buffer %p.", pad, offset, size, *buffer);
if (offset == GST_BUFFER_OFFSET_NONE)
offset = parser->next_pull_offset;
@@ -1281,16 +1281,6 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
if (!*buffer)
*buffer = new_buffer = gst_buffer_new_and_alloc(size);
- if (!size)
- {
- /* asfreader occasionally asks for zero bytes. gst_buffer_map() will
- * return NULL in this case. Avoid confusing the read thread by asking
- * it for zero bytes. */
- gst_buffer_set_size(*buffer, 0);
- GST_LOG("Returning empty buffer.");
- return GST_FLOW_OK;
- }
-
gst_buffer_map(*buffer, &map_info, GST_MAP_WRITE);
pthread_mutex_lock(&parser->mutex);
--
2.33.0

Some files were not shown because too many files have changed in this diff Show More