diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 30e88a91..05b6c729 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -234,6 +234,7 @@ patch_enable_all () enable_openal32_EFX_Extension="$1" enable_opengl32_Revert_Disable_Ext="$1" enable_quartz_MediaSeeking_Positions="$1" + enable_quartz_NULL_TargetFormat="$1" enable_rasapi32_RasEnumDevicesA="$1" enable_riched20_IText_Interface="$1" enable_rpcrt4_Pipe_Transport="$1" @@ -821,6 +822,9 @@ patch_enable () quartz-MediaSeeking_Positions) enable_quartz_MediaSeeking_Positions="$2" ;; + quartz-NULL_TargetFormat) + enable_quartz_NULL_TargetFormat="$2" + ;; rasapi32-RasEnumDevicesA) enable_rasapi32_RasEnumDevicesA="$2" ;; @@ -4873,6 +4877,18 @@ if test "$enable_quartz_MediaSeeking_Positions" -eq 1; then ) >> "$patchlist" fi +# Patchset quartz-NULL_TargetFormat +# | +# | Modified files: +# | * dlls/quartz/filtergraph.c, dlls/quartz/tests/filtergraph.c +# | +if test "$enable_quartz_NULL_TargetFormat" -eq 1; then + patch_apply quartz-NULL_TargetFormat/0001-quartz-Handle-NULL-target-format-in-FilterGraph-Conv.patch + ( + echo '+ { "Anton Baskanov", "quartz: Handle NULL target format in FilterGraph::ConvertTimeFormat.", 2 },'; + ) >> "$patchlist" +fi + # Patchset rasapi32-RasEnumDevicesA # | # | This patchset fixes the following Wine bugs: diff --git a/patches/quartz-NULL_TargetFormat/0001-quartz-Handle-NULL-target-format-in-FilterGraph-Conv.patch b/patches/quartz-NULL_TargetFormat/0001-quartz-Handle-NULL-target-format-in-FilterGraph-Conv.patch new file mode 100644 index 00000000..32a75c00 --- /dev/null +++ b/patches/quartz-NULL_TargetFormat/0001-quartz-Handle-NULL-target-format-in-FilterGraph-Conv.patch @@ -0,0 +1,71 @@ +From 31fe7edbf8cc2a2d73c3ab2bc1e835873f6f361d Mon Sep 17 00:00:00 2001 +From: Anton Baskanov +Date: Wed, 6 Jan 2016 23:29:42 +0600 +Subject: quartz: Handle NULL target format in FilterGraph::ConvertTimeFormat. + (try 2) + +Signed-off-by: Anton Baskanov + +try2: + - added tests +--- + dlls/quartz/filtergraph.c | 3 +++ + dlls/quartz/tests/filtergraph.c | 21 +++++++++++++++++++++ + 2 files changed, 24 insertions(+) + +diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c +index 5b4b080..5cb670e 100644 +--- a/dlls/quartz/filtergraph.c ++++ b/dlls/quartz/filtergraph.c +@@ -2530,6 +2530,9 @@ static HRESULT WINAPI MediaSeeking_ConvertTimeFormat(IMediaSeeking *iface, LONGL + if (!pSourceFormat) + pSourceFormat = &This->timeformatseek; + ++ if (!pTargetFormat) ++ pTargetFormat = &This->timeformatseek; ++ + if (IsEqualGUID(pTargetFormat, pSourceFormat)) + *pTarget = Source; + else +diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c +index 39d6e88..87b1123 100644 +--- a/dlls/quartz/tests/filtergraph.c ++++ b/dlls/quartz/tests/filtergraph.c +@@ -255,6 +255,7 @@ static void test_mediacontrol(void) + { + HRESULT hr; + LONGLONG pos = 0xdeadbeef; ++ GUID format = GUID_NULL; + IMediaSeeking *seeking = NULL; + IMediaFilter *filter = NULL; + IMediaControl *control = NULL; +@@ -282,6 +283,26 @@ static void test_mediacontrol(void) + return; + } + ++ format = GUID_NULL; ++ hr = IMediaSeeking_GetTimeFormat(seeking, &format); ++ ok(hr == S_OK, "GetTimeFormat failed: %08x\n", hr); ++ ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "GetTimeFormat: unexpected format %s\n", wine_dbgstr_guid(&format)); ++ ++ pos = 0xdeadbeef; ++ hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, NULL); ++ ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); ++ ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); ++ ++ pos = 0xdeadbeef; ++ hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); ++ ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); ++ ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); ++ ++ pos = 0xdeadbeef; ++ hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); ++ ok(hr == S_OK, "ConvertTimeFormat failed: %08x\n", hr); ++ ok(pos == 0x123456789a, "ConvertTimeFormat: expected 123456789a, got (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); ++ + hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); + ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(pos == 0, "Position != 0 (%x%08x)\n", (DWORD)(pos >> 32), (DWORD)pos); +-- +2.6.4 + diff --git a/patches/quartz-NULL_TargetFormat/definition b/patches/quartz-NULL_TargetFormat/definition new file mode 100644 index 00000000..1b7a8329 --- /dev/null +++ b/patches/quartz-NULL_TargetFormat/definition @@ -0,0 +1 @@ +Fixes: Handle NULL target format in FilterGraph::ConvertTimeFormat.