Signed-off-by: Vincent Povirk vincent@codeweavers.com --- dlls/windowscodecs/stream.c | 10 +++++----- dlls/windowscodecs/tests/stream.c | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/windowscodecs/stream.c b/dlls/windowscodecs/stream.c index 366d11b1116..68b9148bd5e 100644 --- a/dlls/windowscodecs/stream.c +++ b/dlls/windowscodecs/stream.c @@ -189,12 +189,11 @@ static HRESULT WINAPI StreamOnMemory_CopyTo(IStream *iface, return E_NOTIMPL; }
-/* Commit isn't implemented in the native windowscodecs DLL either */ static HRESULT WINAPI StreamOnMemory_Commit(IStream *iface, DWORD grfCommitFlags) { TRACE("(%p, %#x)\n", iface, grfCommitFlags); - return E_NOTIMPL; + return S_OK; }
/* Revert isn't implemented in the native windowscodecs DLL either */ @@ -375,7 +374,7 @@ static HRESULT WINAPI StreamOnFileHandle_Commit(IStream *iface, DWORD grfCommitFlags) { TRACE("(%p, %#x)\n", iface, grfCommitFlags); - return E_NOTIMPL; + return S_OK; }
static HRESULT WINAPI StreamOnFileHandle_Revert(IStream *iface) @@ -655,8 +654,9 @@ static HRESULT WINAPI StreamOnStreamRange_CopyTo(IStream *iface, static HRESULT WINAPI StreamOnStreamRange_Commit(IStream *iface, DWORD grfCommitFlags) { - TRACE("(%p, %#x)\n", iface, grfCommitFlags); - return E_NOTIMPL; + StreamOnStreamRange *This = StreamOnStreamRange_from_IStream(iface); + TRACE("(%p, %#x)\n", This, grfCommitFlags); + return IStream_Commit(This->stream, grfCommitFlags); }
/* Revert isn't implemented in the native windowscodecs DLL either */ diff --git a/dlls/windowscodecs/tests/stream.c b/dlls/windowscodecs/tests/stream.c index ef0d630c8e2..d3f712c38b0 100644 --- a/dlls/windowscodecs/tests/stream.c +++ b/dlls/windowscodecs/tests/stream.c @@ -326,19 +326,19 @@ static void test_StreamOnMemory(void)
/* Commit */ hr = IWICStream_Commit(pStream, STGC_DEFAULT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pStream, STGC_OVERWRITE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pStream, STGC_ONLYIFCURRENT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pStream, STGC_CONSOLIDATE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
/* Revert */ @@ -643,19 +643,19 @@ static void test_StreamOnStreamRange(void)
/* Commit */ hr = IWICStream_Commit(pSubStream, STGC_DEFAULT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pSubStream, STGC_OVERWRITE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pSubStream, STGC_ONLYIFCURRENT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pSubStream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(pSubStream, STGC_CONSOLIDATE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
/* Revert */ @@ -953,19 +953,19 @@ static void test_StreamOnIStream(void)
/* Commit */ hr = IWICStream_Commit(substream, STGC_DEFAULT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(substream, STGC_OVERWRITE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(substream, STGC_ONLYIFCURRENT); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(substream, STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
hr = IWICStream_Commit(substream, STGC_CONSOLIDATE); - todo_wine ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr); + ok(broken(hr == E_NOTIMPL) || hr == S_OK, "Commit returned %#x\n", hr);
/* Revert */ IWICStream_Write(substream, buff + 5, 6, NULL);