Rebase against 33c35baa6761b00c8cef236c06cb1655f3f228d9

This commit is contained in:
Alistair Leslie-Hughes 2019-04-03 09:11:34 +11:00
parent e2c7fb5bb6
commit 1184d64c71
7 changed files with 29 additions and 424 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "56404595d5c42168d4fd4c1ec3a1b802a6aab5c1"
echo "33c35baa6761b00c8cef236c06cb1655f3f228d9"
}
# Show version information
@ -285,7 +285,6 @@ patch_enable_all ()
enable_shell32_UnixFS="$1"
enable_shlwapi_AssocGetPerceivedType="$1"
enable_shlwapi_SHAddDataBlock="$1"
enable_shlwapi_SHMapHandle="$1"
enable_shlwapi_UrlCombine="$1"
enable_stdole32_idl_Typelib="$1"
enable_stdole32_tlb_SLTG_Typelib="$1"
@ -347,7 +346,6 @@ patch_enable_all ()
enable_winedevice_Default_Drivers="$1"
enable_winemapi_user_xdg_mail="$1"
enable_winemenubuilder_Desktop_Icon_Path="$1"
enable_winemp3_acm_MPEG3_StreamOpen="$1"
enable_wineps_drv_PostScript_Fixes="$1"
enable_winepulse_PulseAudio_Support="$1"
enable_winex11_CandidateWindowPos="$1"
@ -998,9 +996,6 @@ patch_enable ()
shlwapi-SHAddDataBlock)
enable_shlwapi_SHAddDataBlock="$2"
;;
shlwapi-SHMapHandle)
enable_shlwapi_SHMapHandle="$2"
;;
shlwapi-UrlCombine)
enable_shlwapi_UrlCombine="$2"
;;
@ -1184,9 +1179,6 @@ patch_enable ()
winemenubuilder-Desktop_Icon_Path)
enable_winemenubuilder_Desktop_Icon_Path="$2"
;;
winemp3.acm-MPEG3_StreamOpen)
enable_winemp3_acm_MPEG3_StreamOpen="$2"
;;
wineps.drv-PostScript_Fixes)
enable_wineps_drv_PostScript_Fixes="$2"
;;
@ -5838,18 +5830,6 @@ if test "$enable_shlwapi_SHAddDataBlock" -eq 1; then
) >> "$patchlist"
fi
# Patchset shlwapi-SHMapHandle
# |
# | Modified files:
# | * dlls/shlwapi/ordinal.c, dlls/shlwapi/tests/ordinal.c
# |
if test "$enable_shlwapi_SHMapHandle" -eq 1; then
patch_apply shlwapi-SHMapHandle/0002-shlwapi-SHMapHandle-should-not-set-error-when-NULL-i.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "shlwapi: SHMapHandle should not set error when NULL is passed as hShared.", 1 },';
) >> "$patchlist"
fi
# Patchset shlwapi-UrlCombine
# |
# | Modified files:
@ -5960,17 +5940,14 @@ fi
# Patchset taskmgr-Memory_Usage
# |
# | Modified files:
# | * dlls/ntdll/nt.c, programs/taskmgr/font.bmp, programs/taskmgr/graph.c, programs/taskmgr/resource.h,
# | programs/taskmgr/taskmgr.c, programs/taskmgr/taskmgr.rc
# | * dlls/ntdll/nt.c, programs/taskmgr/graph.c
# |
if test "$enable_taskmgr_Memory_Usage" -eq 1; then
patch_apply taskmgr-Memory_Usage/0002-ntdll-Report-system-information-SystemPerformanceInf.patch
patch_apply taskmgr-Memory_Usage/0003-taskmgr-Use-system-font-instead-of-special-bitmap-fo.patch
patch_apply taskmgr-Memory_Usage/0004-taskmgr-Use-different-units-depending-on-memory-usag.patch
patch_apply taskmgr-Memory_Usage/0005-ntdll-Implement-basic-IO-stats-for-SystemPerformance.patch
(
printf '%s\n' '+ { "Michael Müller", "ntdll: Report system information SystemPerformanceInformation info class.", 2 },';
printf '%s\n' '+ { "Michael Müller", "taskmgr: Use system font instead of special bitmap font.", 1 },';
printf '%s\n' '+ { "Michael Müller", "taskmgr: Use different units depending on memory usage.", 1 },';
printf '%s\n' '+ { "Michael Müller", "ntdll: Implement basic IO stats for SystemPerformanceInformation in NtQuerySystemInformation.", 1 },';
) >> "$patchlist"
@ -6855,18 +6832,6 @@ if test "$enable_winemenubuilder_Desktop_Icon_Path" -eq 1; then
) >> "$patchlist"
fi
# Patchset winemp3.acm-MPEG3_StreamOpen
# |
# | Modified files:
# | * dlls/l3codeca.acm/mpegl3.c, dlls/msacm32/tests/msacm.c
# |
if test "$enable_winemp3_acm_MPEG3_StreamOpen" -eq 1; then
patch_apply winemp3.acm-MPEG3_StreamOpen/0001-winemp3.acm-Check-input-format-in-MPEG3_StreamOpen.patch
(
printf '%s\n' '+ { "Michael Müller", "l3codeca.acm: Check input format in MPEG3_StreamOpen.", 1 },';
) >> "$patchlist"
fi
# Patchset wineps.drv-PostScript_Fixes
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,43 +0,0 @@
From b1f09e2b10f9a763e3683b561b211414af6f11fb Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 27 Dec 2015 18:45:11 +0100
Subject: shlwapi: SHMapHandle should not set error when NULL is passed as
hShared.
---
dlls/shlwapi/ordinal.c | 6 ++++++
dlls/shlwapi/tests/ordinal.c | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c
index 699fcc6..7832036 100644
--- a/dlls/shlwapi/ordinal.c
+++ b/dlls/shlwapi/ordinal.c
@@ -98,6 +98,12 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId,
TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId,
dwAccess, dwOptions);
+ if (!hShared)
+ {
+ TRACE("Returning handle NULL\n");
+ return NULL;
+ }
+
/* Get dest process handle */
if (dwDstProcId == dwMyProcId)
hDst = GetCurrentProcess();
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c
index df07df4..d0f7b56 100644
--- a/dlls/shlwapi/tests/ordinal.c
+++ b/dlls/shlwapi/tests/ordinal.c
@@ -553,7 +553,6 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem)
SetLastError(0xdeadbeef);
hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0);
ok(hmem2 == NULL, "expected NULL, got new handle\n");
-todo_wine
ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError());
hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0);
--
2.6.4

View File

@ -1 +0,0 @@
Fixes: SHMapHandle should not set error when NULL is passed as hShared

View File

@ -1,139 +0,0 @@
From 0659b8d913f16629a537f13b63afba8744d62e5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 27 Jan 2016 04:55:09 +0100
Subject: [PATCH] taskmgr: Use system font instead of special bitmap font.
---
programs/taskmgr/font.bmp | Bin 646 -> 0 bytes
programs/taskmgr/graph.c | 14 ++++++++++++--
programs/taskmgr/resource.h | 1 -
programs/taskmgr/taskmgr.c | 29 -----------------------------
programs/taskmgr/taskmgr.rc | 3 ---
5 files changed, 12 insertions(+), 35 deletions(-)
delete mode 100644 programs/taskmgr/font.bmp
diff --git a/programs/taskmgr/font.bmp b/programs/taskmgr/font.bmp
deleted file mode 100644
index c1f8410c93273f4bc7013014561c35ef84faa182..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 646
zcma)(!4U#62u0EH6fcfdSci9eun5QVo~(m&sz_(+`>@G4J060-haZBlxj#Nf3wh&j
z*b_Tr2Rq@-E}XxvX+aFPn4z{T33x(lt${jNLv39ZVf;klYOQWo0y8!j?qiD3aA3(K
zIq{C$VS%n9(V2QTr);{O_DntBpT=8p%%lCvw&%ZnE9Lyb=%2T9J{pLZxOXEEt2{0S
rj&qR`_imbB3(wY5`TKp;OQ!n~kRUw=3;lV4-TOj~_w9QN#T)VkBip4W
diff --git a/programs/taskmgr/graph.c b/programs/taskmgr/graph.c
index e6819cf..7e978e1 100644
--- a/programs/taskmgr/graph.c
+++ b/programs/taskmgr/graph.c
@@ -43,6 +43,7 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
RECT rcClient;
RECT rcBarLeft;
RECT rcBarRight;
+ RECT rcText;
WCHAR Text[256];
ULONG CpuUsage;
ULONG CpuKernelUsage;
@@ -96,7 +97,11 @@ static void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
* Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text
*/
- Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - 32) / 2, rcClient.bottom - 11 - 5);
+ CopyRect(&rcText, &rcClient);
+ rcText.top = rcText.bottom - 19;
+
+ SetTextColor(hDC, BRIGHT_GREEN);
+ DrawTextW(hDC, Text, -1, &rcText, DT_CENTER);
/*
* Now we have to draw the graph
@@ -223,6 +228,7 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
RECT rcClient;
RECT rcBarLeft;
RECT rcBarRight;
+ RECT rcText;
WCHAR Text[256];
ULONGLONG CommitChargeTotal;
ULONGLONG CommitChargeLimit;
@@ -257,7 +263,11 @@ static void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
* Draw the font text onto the graph
* The bottom 20 pixels are reserved for the text
*/
- Font_DrawText(hDC, Text, ((rcClient.right - rcClient.left) - (lstrlenW(Text) * 8)) / 2, rcClient.bottom - 11 - 5);
+ CopyRect(&rcText, &rcClient);
+ rcText.top = rcText.bottom - 19;
+
+ SetTextColor(hDC, BRIGHT_GREEN);
+ DrawTextW(hDC, Text, -1, &rcText, DT_CENTER);
/*
* Now we have to draw the graph
diff --git a/programs/taskmgr/resource.h b/programs/taskmgr/resource.h
index cd43f15..4153f66 100644
--- a/programs/taskmgr/resource.h
+++ b/programs/taskmgr/resource.h
@@ -35,7 +35,6 @@
#define IDR_PROCESS_PAGE_CONTEXT 144
#define IDB_TRAYMASK 150
#define IDB_TRAYICON 153
-#define IDB_FONT 154
#define IDD_DEBUG_CHANNELS_DIALOG 155
#define IDC_DEBUG_CHANNELS_LIST 156
diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c
index b99d238..d3337d2 100644
--- a/programs/taskmgr/taskmgr.c
+++ b/programs/taskmgr/taskmgr.c
@@ -76,35 +76,6 @@ static void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLef
FillSolidRect2(hDC, x, y + cy, cx, -1, clrBottomRight);
}
-void Font_DrawText(HDC hDC, LPWSTR lpwszText, int x, int y)
-{
- HDC hFontDC;
- HBITMAP hFontBitmap;
- HBITMAP hOldBitmap;
- int i;
-
- hFontDC = CreateCompatibleDC(hDC);
- hFontBitmap = LoadBitmapW(hInst, MAKEINTRESOURCEW(IDB_FONT));
- hOldBitmap = SelectObject(hFontDC, hFontBitmap);
-
- for (i = 0; lpwszText[i]; i++) {
- if ((lpwszText[i] >= '0') && (lpwszText[i] <= '9')) {
- BitBlt(hDC, x + (i * 8), y, 8, 11, hFontDC, (lpwszText[i] - '0') * 8, 0, SRCCOPY);
- }
- else if (lpwszText[i] == 'K')
- {
- BitBlt(hDC, x + (i * 8), y, 8, 11, hFontDC, 80, 0, SRCCOPY);
- }
- else if (lpwszText[i] == '%')
- {
- BitBlt(hDC, x + (i * 8), y, 8, 11, hFontDC, 88, 0, SRCCOPY);
- }
- }
- SelectObject(hFontDC, hOldBitmap);
- DeleteObject(hFontBitmap);
- DeleteDC(hFontDC);
-}
-
static BOOL OnCreate(HWND hWnd)
{
HMENU hMenu;
diff --git a/programs/taskmgr/taskmgr.rc b/programs/taskmgr/taskmgr.rc
index e6742a7..ffd0699 100644
--- a/programs/taskmgr/taskmgr.rc
+++ b/programs/taskmgr/taskmgr.rc
@@ -609,6 +609,3 @@ IDB_TRAYMASK BITMAP traymask.bmp
/* @makedep: trayicon.bmp */
IDB_TRAYICON BITMAP trayicon.bmp
-
-/* @makedep: font.bmp */
-IDB_FONT BITMAP font.bmp
--
1.9.1

View File

@ -1,4 +1,4 @@
From 11c1254ba19c465a4a8683d3293bafdc1b9c1a39 Mon Sep 17 00:00:00 2001
From e8dc870c41c85729d2ccf24738f63fd9c8c22d68 Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Thu, 7 Jun 2018 11:51:01 +0200
Subject: [PATCH] uianimation: Add stub dll
@ -10,14 +10,13 @@ Split into multiple changes.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
dlls/uianimation/Makefile.in | 5 +
dlls/uianimation/main.c | 918 +++++++++++++++++++++++++++++++
dlls/uianimation/uianimation.spec | 9 +-
dlls/uianimation/main.c | 897 ++++++++++++++++++++++-
dlls/uianimation/uianimation_typelib.idl | 23 +
4 files changed, 951 insertions(+), 4 deletions(-)
3 files changed, 915 insertions(+), 10 deletions(-)
create mode 100644 dlls/uianimation/uianimation_typelib.idl
diff --git a/dlls/uianimation/Makefile.in b/dlls/uianimation/Makefile.in
index b504181..3663c23 100644
index b504181b9a2..3663c23d68e 100644
--- a/dlls/uianimation/Makefile.in
+++ b/dlls/uianimation/Makefile.in
@@ -1,4 +1,9 @@
@ -31,10 +30,10 @@ index b504181..3663c23 100644
+ uianimation_typelib.idl
+
diff --git a/dlls/uianimation/main.c b/dlls/uianimation/main.c
index 0fa9bfb..793a200 100644
index 92d594ff5d7..1d2d86b3551 100644
--- a/dlls/uianimation/main.c
+++ b/dlls/uianimation/main.c
@@ -21,15 +21,906 @@
@@ -21,19 +21,906 @@
#include "config.h"
#include <stdarg.h>
@ -42,8 +41,8 @@ index 0fa9bfb..793a200 100644
+
#include "windef.h"
#include "winbase.h"
+#include "objbase.h"
+#include "rpcproxy.h"
#include "objbase.h"
#include "rpcproxy.h"
+#include "oaidl.h"
+#include "ocidl.h"
@ -56,8 +55,8 @@ index 0fa9bfb..793a200 100644
WINE_DEFAULT_DEBUG_CHANNEL(uianimation);
+static HINSTANCE hinstance;
+
static HINSTANCE hinstance;
+struct class_factory
+{
+ IClassFactory IClassFactory_iface;
@ -941,59 +940,26 @@ index 0fa9bfb..793a200 100644
BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
{
TRACE("(%p %d %p)\n", dll, reason, reserved);
@@ -39,8 +930,35 @@ BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
+ hinstance = dll;
DisableThreadLibraryCalls( dll );
break;
}
@@ -50,16 +937,6 @@ BOOL WINAPI DllMain( HINSTANCE dll, DWORD reason, LPVOID reserved )
return TRUE;
}
+
+/******************************************************************
+ * DllCanUnloadNow
+ */
+HRESULT WINAPI DllCanUnloadNow( void )
+{
+ TRACE( "()\n" );
+ return S_FALSE;
+}
+
+
+/***********************************************************************
+ * DllRegisterServer
+ */
+HRESULT WINAPI DllRegisterServer( void )
+{
+ return __wine_register_resources( hinstance );
+}
+
+/***********************************************************************
+ * DllUnregisterServer
+ */
+HRESULT WINAPI DllUnregisterServer( void )
+{
+ return __wine_unregister_resources( hinstance );
+}
diff --git a/dlls/uianimation/uianimation.spec b/dlls/uianimation/uianimation.spec
index a43b12d..37b010b 100644
--- a/dlls/uianimation/uianimation.spec
+++ b/dlls/uianimation/uianimation.spec
@@ -1,4 +1,5 @@
-@ stub DllCanUnloadNow()
-@ stub DllGetClassObject(ptr ptr ptr)
-@ stub DllRegisterServer()
-@ stub DllUnregisterServer()
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
+@ stdcall -private DllRegisterServer()
+@ stdcall -private DllUnregisterServer()
+
-/******************************************************************
- * DllGetClassObject
- */
-HRESULT WINAPI DllGetClassObject( REFCLSID clsid, REFIID iid, void **obj )
-{
- FIXME( "(%s %s %p)\n", debugstr_guid( clsid ), debugstr_guid( iid ), obj );
-
- return CLASS_E_CLASSNOTAVAILABLE;
-}
-
/******************************************************************
* DllCanUnloadNow
*/
diff --git a/dlls/uianimation/uianimation_typelib.idl b/dlls/uianimation/uianimation_typelib.idl
new file mode 100644
index 0000000..9066c09
index 00000000000..9066c09a021
--- /dev/null
+++ b/dlls/uianimation/uianimation_typelib.idl
@@ -0,0 +1,23 @@
@ -1021,5 +987,5 @@ index 0000000..9066c09
+
+#include "uianimation.idl"
--
1.9.1
2.20.1

View File

@ -1,142 +0,0 @@
From 021f484e633dc4cebb04e011fab3a6f2ee8e2336 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 21 Aug 2016 02:36:47 +0200
Subject: l3codeca.acm: Check input format in MPEG3_StreamOpen.
---
dlls/msacm32/tests/msacm.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++
dlls/l3codeca.acm/mpegl3.c | 15 +++++++++-
2 files changed, 85 insertions(+), 1 deletion(-)
diff --git a/dlls/msacm32/tests/msacm.c b/dlls/msacm32/tests/msacm.c
index 959ec7f0c06..ea98934c198 100644
--- a/dlls/msacm32/tests/msacm.c
+++ b/dlls/msacm32/tests/msacm.c
@@ -1276,6 +1276,76 @@ static void test_acmFormatChoose(void)
HeapFree(GetProcessHeap(), 0, pwfx);
}
+static void test_mp3(void)
+{
+ MPEGLAYER3WAVEFORMAT src;
+ WAVEFORMATEX dst;
+ HACMSTREAM has;
+ DWORD output;
+ MMRESULT mr;
+
+ src.wfx.wFormatTag = WAVE_FORMAT_MPEGLAYER3;
+ src.wfx.nSamplesPerSec = 11025;
+ src.wfx.wBitsPerSample = 0;
+ src.wfx.nChannels = 1;
+ src.wfx.nBlockAlign = 576;
+ src.wfx.nAvgBytesPerSec = 2000;
+
+ src.wID = MPEGLAYER3_ID_MPEG;
+ src.fdwFlags = 0;
+ src.nBlockSize = 576;
+ src.nFramesPerBlock = 1;
+ src.nCodecDelay = 0;
+
+ dst.cbSize = 0;
+ dst.wFormatTag = WAVE_FORMAT_PCM;
+ dst.nSamplesPerSec = 11025;
+ dst.wBitsPerSample = 16;
+ dst.nChannels = 1;
+ dst.nBlockAlign = dst.wBitsPerSample * dst.nChannels / 8;
+ dst.nAvgBytesPerSec = dst.nSamplesPerSec * dst.nBlockAlign;
+
+ src.wfx.cbSize = 0;
+
+ mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0);
+ ok(mr == ACMERR_NOTPOSSIBLE, "expected error ACMERR_NOTPOSSIBLE, got 0x%x\n", mr);
+ if (mr == MMSYSERR_NOERROR) acmStreamClose(has, 0);
+
+ src.wfx.cbSize = MPEGLAYER3_WFX_EXTRA_BYTES;
+ src.wID = 0;
+
+ mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0);
+ ok(mr == ACMERR_NOTPOSSIBLE, "expected error ACMERR_NOTPOSSIBLE, got 0x%x\n", mr);
+ if (mr == MMSYSERR_NOERROR) acmStreamClose(has, 0);
+
+ src.wID = MPEGLAYER3_ID_MPEG;
+ src.nBlockSize = 0;
+
+ mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+ mr = acmStreamClose(has, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+
+ src.nBlockSize = 576;
+ src.wfx.nAvgBytesPerSec = 0;
+
+ mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+ /* causes a division by zero exception */
+ if (0) acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE);
+ mr = acmStreamClose(has, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+
+ src.wfx.nAvgBytesPerSec = 2000;
+
+ mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+ mr = acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+ mr = acmStreamClose(has, 0);
+ ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr);
+}
+
static struct
{
struct
@@ -1446,6 +1516,7 @@ START_TEST(msacm)
test_acmFormatSuggest();
test_acmFormatTagDetails();
test_acmFormatChoose();
+ test_mp3();
/* Test acmDriverAdd in the end as it may conflict
* with other tests due to codec lookup order */
test_acmDriverAdd();
diff --git a/dlls/l3codeca.acm/mpegl3.c b/dlls/l3codeca.acm/mpegl3.c
index 0e419bd66dc..b28519f835a 100644
--- a/dlls/l3codeca.acm/mpegl3.c
+++ b/dlls/l3codeca.acm/mpegl3.c
@@ -215,6 +215,7 @@ static void MPEG3_Reset(PACMDRVSTREAMINSTANCE adsi, AcmMpeg3Data* aad)
*/
static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
{
+ LRESULT error = MMSYSERR_NOTSUPPORTED;
AcmMpeg3Data* aad;
int err;
@@ -238,6 +239,18 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEG) &&
adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
{
+ if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_MPEGLAYER3)
+ {
+ MPEGLAYER3WAVEFORMAT *formatmp3 = (MPEGLAYER3WAVEFORMAT *)adsi->pwfxSrc;
+
+ if (adsi->pwfxSrc->cbSize < MPEGLAYER3_WFX_EXTRA_BYTES ||
+ formatmp3->wID != MPEGLAYER3_ID_MPEG)
+ {
+ error = ACMERR_NOTPOSSIBLE;
+ goto theEnd;
+ }
+ }
+
/* resampling or mono <=> stereo not available
* MPEG3 algo only define 16 bit per sample output
*/
@@ -273,7 +286,7 @@ static LRESULT MPEG3_StreamOpen(PACMDRVSTREAMINSTANCE adsi)
theEnd:
HeapFree(GetProcessHeap(), 0, aad);
adsi->dwDriver = 0L;
- return MMSYSERR_NOTSUPPORTED;
+ return error;
}
/***********************************************************************
--
2.13.1

View File

@ -1 +0,0 @@
Fixes: Check input format in MPEG3_StreamOpen