mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 09:04:10 +00:00
amstream: Return E_INVALIDARG when a rect but no surface is passed in IDirectDrawMediaStream::CreateSample().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7bdb713bc4
commit
a4ddb5a1e6
|
@ -442,6 +442,9 @@ static HRESULT WINAPI ddraw_IDirectDrawMediaStream_CreateSample(IDirectDrawMedia
|
|||
TRACE("stream %p, surface %p, rect %s, flags %#x, sample %p.\n",
|
||||
stream, surface, wine_dbgstr_rect(rect), flags, sample);
|
||||
|
||||
if (!surface && rect)
|
||||
return E_INVALIDARG;
|
||||
|
||||
EnterCriticalSection(&stream->cs);
|
||||
hr = ddrawstreamsample_create(stream, surface, rect, sample);
|
||||
LeaveCriticalSection(&stream->cs);
|
||||
|
|
|
@ -5665,7 +5665,7 @@ static void test_ddrawstream_create_sample(void)
|
|||
|
||||
SetRectEmpty(&rect);
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, &rect, 0, &sample);
|
||||
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
||||
ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
|
||||
|
||||
EXPECT_REF(stream, 3);
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &sample);
|
||||
|
|
Loading…
Reference in a new issue