From: Anton Baskanov baskanov@gmail.com
--- dlls/winegstreamer/quartz_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 596f7a5011a..e402e1aab52 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -1895,7 +1895,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface, EnterCriticalSection(&filter->streaming_cs); filter->flushing = false; LeaveCriticalSection(&filter->streaming_cs); - WakeConditionVariable(&filter->flushing_cv); + WakeAllConditionVariable(&filter->flushing_cv);
return S_OK; }
From: Anton Baskanov baskanov@gmail.com
--- dlls/amstream/tests/amstream.c | 65 +++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 16 deletions(-)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index a2f27c1b557..e75bddfc7d1 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1839,10 +1839,10 @@ static void test_media_streams(void) static void test_enum_pins(void) { IAMMultiMediaStream *mmstream = create_ammultimediastream(); + IMediaStream *stream0, *stream1; + IPin *pins[3], *pin0, *pin1; IMediaStreamFilter *filter; IEnumPins *enum1, *enum2; - IMediaStream *stream; - IPin *pins[3], *pin; ULONG ref, count; HRESULT hr;
@@ -1877,9 +1877,13 @@ static void test_enum_pins(void) hr = IEnumPins_Skip(enum1, 1); ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
- hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryVideo, 0, &stream0); ok(hr == S_OK, "Got hr %#lx.\n", hr); - hr = IMediaStream_QueryInterface(stream, &IID_IPin, (void **)&pin); + hr = IAMMultiMediaStream_AddMediaStream(mmstream, NULL, &MSPID_PrimaryAudio, 0, &stream1); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IMediaStream_QueryInterface(stream0, &IID_IPin, (void **)&pin0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IMediaStream_QueryInterface(stream1, &IID_IPin, (void **)&pin1); ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Reset() isn't enough; we have to call EnumPins() again to see the updated @@ -1899,20 +1903,33 @@ static void test_enum_pins(void) 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(pin); + ref = get_refcount(pin0); + ok(ref == 4, "Got unexpected refcount %ld.\n", ref); + ref = get_refcount(pin1); ok(ref == 4, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); + ok(pins[0] == pin0, "Expected pin %p, got %p.\n", pin0, 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(pin); + ref = get_refcount(pin0); ok(ref == 5, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]);
+ 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]); + 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); + IPin_Release(pins[0]); + hr = IEnumPins_Next(enum1, 1, pins, NULL); ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
@@ -1922,20 +1939,28 @@ 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); - ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); + ok(pins[0] == pin0, "Expected pin %p, got %p.\n", pin0, pins[0]); + IPin_Release(pins[0]); + + 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]); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); ok(hr == S_OK, "Got hr %#lx.\n", hr);
- hr = IEnumPins_Next(enum1, 2, pins, NULL); + hr = IEnumPins_Next(enum1, 3, pins, NULL); ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
- hr = IEnumPins_Next(enum1, 2, pins, &count); + hr = IEnumPins_Next(enum1, 3, pins, &count); ok(hr == S_FALSE, "Got hr %#lx.\n", hr); - ok(count == 1, "Got count %lu.\n", count); - ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); + ok(count == 2, "Got count %lu.\n", count); + ok(pins[0] == pin0, "Expected pin %p, got %p.\n", pin0, pins[0]); + ok(pins[1] == pin1, "Expected pin %p, got %p.\n", pin1, pins[1]); IPin_Release(pins[0]); + IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); ok(hr == S_OK, "Got hr %#lx.\n", hr); @@ -1946,7 +1971,7 @@ static void test_enum_pins(void) hr = IEnumPins_Skip(enum1, 0); ok(hr == S_OK, "Got hr %#lx.\n", hr);
- hr = IEnumPins_Skip(enum1, 1); + hr = IEnumPins_Skip(enum1, 2); ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); @@ -1954,7 +1979,12 @@ static void test_enum_pins(void)
hr = IEnumPins_Next(enum2, 1, pins, NULL); ok(hr == S_OK, "Got hr %#lx.\n", hr); - ok(pins[0] == pin, "Expected pin %p, got %p.\n", pin, pins[0]); + ok(pins[0] == pin0, "Expected pin %p, got %p.\n", pin0, pins[0]); + IPin_Release(pins[0]); + + 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]); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -1963,8 +1993,11 @@ static void test_enum_pins(void) IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); ok(!ref, "Got outstanding refcount %ld.\n", ref); - IMediaStream_Release(stream); - ref = IPin_Release(pin); + IMediaStream_Release(stream1); + IMediaStream_Release(stream0); + ref = IPin_Release(pin1); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IPin_Release(pin0); ok(!ref, "Got outstanding refcount %ld.\n", ref); }
From: Anton Baskanov baskanov@gmail.com
--- 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);
This merge request was approved by Zebediah Figura.