diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c index 5425ef42a37..82ef4822344 100644 --- a/dlls/amstream/multimedia.c +++ b/dlls/amstream/multimedia.c @@ -181,7 +181,11 @@ static HRESULT WINAPI multimedia_stream_GetDuration(IAMMultiMediaStream *iface, if (!mmstream->media_seeking) return E_NOINTERFACE; - return IMediaSeeking_GetDuration(mmstream->media_seeking, duration); + + if (IMediaSeeking_GetDuration(mmstream->media_seeking, duration) != S_OK) + return S_FALSE; + + return S_OK; } static HRESULT WINAPI multimedia_stream_Seek(IAMMultiMediaStream *iface, STREAM_TIME seek_time) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 6a72f3ed891..a25ae42a314 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -414,7 +414,7 @@ static void test_mmstream_get_duration(const WCHAR *test_avi_path) duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); ref = IAMMultiMediaStream_Release(mmstream); @@ -427,7 +427,7 @@ static void test_mmstream_get_duration(const WCHAR *test_avi_path) duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); ref = IAMMultiMediaStream_Release(mmstream); @@ -442,7 +442,7 @@ static void test_mmstream_get_duration(const WCHAR *test_avi_path) duration = 0xdeadbeefdeadbeefULL; hr = IAMMultiMediaStream_GetDuration(mmstream, &duration); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); ok(duration == 0, "Got duration %s.\n", wine_dbgstr_longlong(duration)); ref = IAMMultiMediaStream_Release(mmstream);