Fixes the following issues: - GetSurface actually returns a non-NULL surface as CreateSample creates the surface if it was not provided. - CreateSample with the pdds7 surface fails with DDERR_INVALIDSURFACETYPE as the surface size does not match the video size.
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/amstream/tests/amstream.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index e962d85e73..001cae5611 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -322,14 +322,15 @@ static void test_renderfile(void) surface = NULL; hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface, &rect); ok(hr == S_OK, "got 0x%08x\n", hr); - ok(surface == NULL, "got %p\n", surface); + ok(surface != NULL, "expected non-NULL surface\n"); + IDirectDrawSurface_Release(surface); IDirectDrawStreamSample_Release(pddsample);
hr = IDirectDrawSurface7_QueryInterface(pdds7, &IID_IDirectDrawSurface, (void**)&surface); ok(hr == S_OK, "got 0x%08x\n", hr);
EXPECT_REF(surface, 1); - hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, NULL, 0, &pddsample); + hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, &rect, 0, &pddsample); ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); EXPECT_REF(surface, 2); IDirectDrawStreamSample_Release(pddsample);