Module: wine Branch: master Commit: b173aa7a987a66a69ff45e850ee4bec3403c5536 URL: https://gitlab.winehq.org/wine/wine/-/commit/b173aa7a987a66a69ff45e850ee4bec...
Author: Ziqing Hui zhui@codeweavers.com Date: Thu Nov 17 17:23:30 2022 +0800
winegstreamer: Implement media_object_GetStreamCount for WMV decoder.
---
dlls/mf/tests/transform.c | 6 ------ dlls/winegstreamer/wmv_decoder.c | 10 ++++++++-- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 2ff6f7dbfc4..cc8914ff17b 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -4501,22 +4501,16 @@ static void test_wmv_decoder_media_object(void) /* Test GetStreamCount. */ in_count = out_count = 0xdeadbeef; hr = IMediaObject_GetStreamCount(media_object, &in_count, &out_count); - todo_wine ok(hr == S_OK, "GetStreamCount returned %#lx.\n", hr); - if (hr == S_OK) - { ok(in_count == 1, "Got unexpected in_count %lu.\n", in_count); ok(out_count == 1, "Got unexpected in_count %lu.\n", out_count); - }
/* Test GetStreamCount with invalid arguments. */ in_count = out_count = 0xdeadbeef; hr = IMediaObject_GetStreamCount(media_object, NULL, &out_count); - todo_wine ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr); ok(out_count == 0xdeadbeef, "Got unexpected out_count %lu.\n", out_count); hr = IMediaObject_GetStreamCount(media_object, &in_count, NULL); - todo_wine ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr); ok(in_count == 0xdeadbeef, "Got unexpected in_count %lu.\n", in_count);
diff --git a/dlls/winegstreamer/wmv_decoder.c b/dlls/winegstreamer/wmv_decoder.c index 6ee21e5b5c1..fe9870e1bc3 100644 --- a/dlls/winegstreamer/wmv_decoder.c +++ b/dlls/winegstreamer/wmv_decoder.c @@ -320,8 +320,14 @@ static ULONG WINAPI media_object_Release(IMediaObject *iface)
static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output) { - FIXME("iface %p, input %p, output %p stub!\n", iface, input, output); - return E_NOTIMPL; + TRACE("iface %p, input %p, output %p.\n", iface, input, output); + + if (!input || !output) + return E_POINTER; + + *input = *output = 1; + + return S_OK; }
static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)