From a69c7a8aa09f88ce88e67e7192c9a59117c7d9fe Mon Sep 17 00:00:00 2001 From: Anton Baskanov Date: Mon, 27 Nov 2023 17:06:02 +0700 Subject: [PATCH] amstream: Use correct index in MediaStreamFilter's IEnumPins::Next(). --- dlls/amstream/filter.c | 2 +- dlls/amstream/tests/amstream.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/amstream/filter.c b/dlls/amstream/filter.c index c1c97630bb9..0ca0f2e2a1c 100644 --- a/dlls/amstream/filter.c +++ b/dlls/amstream/filter.c @@ -94,7 +94,7 @@ static HRESULT WINAPI enum_pins_Next(IEnumPins *iface, ULONG count, IPin **pins, for (i = 0; i < count && enum_pins->index < enum_pins->count; ++i) { - IPin_AddRef(pins[i] = enum_pins->pins[i]); + IPin_AddRef(pins[i] = enum_pins->pins[enum_pins->index]); enum_pins->index++; } diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index e75bddfc7d1..f1e17ef49cf 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1921,13 +1921,13 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); + ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); ref = get_refcount(filter); ok(ref == 4, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin1); - todo_wine ok(ref == 5, "Got unexpected refcount %ld.\n", ref); + ok(ref == 5, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); hr = IEnumPins_Next(enum1, 1, pins, NULL); @@ -1945,7 +1945,7 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum1, 1, pins, &count); ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %lu.\n", count); - todo_wine ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); + ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); IPin_Release(pins[0]); hr = IEnumPins_Reset(enum1); @@ -1984,7 +1984,7 @@ static void test_enum_pins(void) hr = IEnumPins_Next(enum2, 1, pins, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); + ok(pins[0] == pin1, "Expected pin %p, got %p.\n", pin1, pins[0]); IPin_Release(pins[0]); IEnumPins_Release(enum2);