diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 5b858042f20..39882db13b3 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -182,11 +182,9 @@ todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 3); -todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 2); -todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 1); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 2fdd2baf585..58533bd70a5 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -144,22 +144,20 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo return S_OK; } -static IPin* WINAPI TransformFilter_GetPin(BaseFilter *iface, int pos) +static IPin *WINAPI TransformFilter_GetPin(BaseFilter *iface, int index) { - TransformFilter *This = impl_from_BaseFilter(iface); + TransformFilter *filter = impl_from_BaseFilter(iface); - if (pos >= This->npins || pos < 0) + if (index >= 2 || index < 0) return NULL; - IPin_AddRef(This->ppPins[pos]); - return This->ppPins[pos]; + IPin_AddRef(filter->ppPins[index]); + return filter->ppPins[index]; } static LONG WINAPI TransformFilter_GetPinCount(BaseFilter *iface) { - TransformFilter *This = impl_from_BaseFilter(iface); - - return (This->npins+1); + return 2; } static const BaseFilterFuncTable tfBaseFuncTable = { @@ -203,7 +201,6 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p /* pTransformFilter is already allocated */ pTransformFilter->pFuncsTable = pFuncsTable; ZeroMemory(&pTransformFilter->pmt, sizeof(pTransformFilter->pmt)); - pTransformFilter->npins = 2; pTransformFilter->ppPins = CoTaskMemAlloc(2 * sizeof(IPin *)); @@ -314,7 +311,7 @@ ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface) { ULONG i; - for (i = 0; i < This->npins; i++) + for (i = 0; i < 2; i++) { IPin *pConnectedTo; diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 83a9084b42e..a3890ae8e73 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -212,7 +212,6 @@ typedef struct TransformFilter BaseFilter filter; IPin **ppPins; - ULONG npins; AM_MEDIA_TYPE pmt; CRITICAL_SECTION csReceive;