Commit 72bd5349 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Fix the seeking in stream region streams.

parent 623bf111
...@@ -341,7 +341,7 @@ static HRESULT WINAPI StreamOnStreamRange_Read(IStream *iface, ...@@ -341,7 +341,7 @@ static HRESULT WINAPI StreamOnStreamRange_Read(IStream *iface,
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart; SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart;
hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_CUR, NULL); hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
} }
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
...@@ -384,7 +384,7 @@ static HRESULT WINAPI StreamOnStreamRange_Write(IStream *iface, ...@@ -384,7 +384,7 @@ static HRESULT WINAPI StreamOnStreamRange_Write(IStream *iface,
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart; SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart;
hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_CUR, NULL); hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
} }
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment