Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/avico.c | 4 +--- dlls/qcap/avimux.c | 4 +--- dlls/qcap/smartteefilter.c | 9 ++++++--- dlls/qcap/vfwcapture.c | 5 ++--- dlls/quartz/filesource.c | 6 ++---- dlls/strmbase/pin.c | 5 +---- dlls/strmbase/transform.c | 4 +--- dlls/winegstreamer/gstdemux.c | 7 +------ dlls/wineqtdecoder/qtsplitter.c | 4 +--- include/wine/strmbase.h | 4 ++-- 10 files changed, 18 insertions(+), 34 deletions(-)
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 43cca04a064..33d1c7fab2e 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -526,12 +526,10 @@ static const IPinVtbl AVICompressorOutputPinVtbl = { BasePinImpl_NewSegment };
-static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt) { AVICompressor *This = impl_from_strmbase_filter(base->filter);
- TRACE("(%p)->(%d %p)\n", base, iPosition, amt); - if(iPosition || !This->videoinfo) return S_FALSE;
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index f969e73a8ca..42b198deea4 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1174,12 +1174,10 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base, return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt); }
-static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt) { TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
- if(iPosition < 0) - return E_INVALIDARG; if(iPosition > 0) return VFW_S_NO_MORE_ITEMS;
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 390bfa8e20d..7bb053d5507 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -179,7 +179,8 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE return S_OK; }
-static HRESULT sink_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT sink_get_media_type(struct strmbase_pin *base, + unsigned int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); HRESULT hr; @@ -367,7 +368,8 @@ static HRESULT capture_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY return S_OK; }
-static HRESULT capture_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT capture_get_media_type(struct strmbase_pin *base, + unsigned int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); TRACE("(%p, %d, %p)\n", This, iPosition, amt); @@ -437,7 +439,8 @@ static HRESULT preview_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY return S_OK; }
-static HRESULT preview_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT preview_get_media_type(struct strmbase_pin *base, + unsigned int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); TRACE("(%p, %d, %p)\n", This, iPosition, amt); diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 551dad61f33..a5664b7c1c6 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -518,14 +518,13 @@ static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE return qcap_driver_check_format(filter->driver_info, mt); }
-static HRESULT source_get_media_type(struct strmbase_pin *pin, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *pin, + unsigned int iPosition, AM_MEDIA_TYPE *pmt) { VfwCapture *filter = impl_from_strmbase_pin(pin); AM_MEDIA_TYPE *vfw_pmt; HRESULT hr;
- if (iPosition < 0) - return E_INVALIDARG; if (iPosition > 0) return VFW_S_NO_MORE_ITEMS;
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 031307e1839..160b814738c 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -591,13 +591,11 @@ static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TY return S_FALSE; }
-static HRESULT source_get_media_type(struct strmbase_pin *iface, int index, AM_MEDIA_TYPE *mt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { AsyncReader *filter = impl_from_strmbase_pin(iface);
- if (index < 0) - return E_INVALIDARG; - else if (index > 1) + if (index > 1) return VFW_S_NO_MORE_ITEMS;
if (index == 0) diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 4a7b3b20bfe..403e468550d 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -152,11 +152,8 @@ static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * ((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype))); }
-/*** Common Base Pin function */ -HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt) { - if (iPosition < 0) - return E_INVALIDARG; return VFW_S_NO_MORE_ITEMS; }
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index fc2f0b1d2d4..fa041b66bd2 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -110,12 +110,10 @@ static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(struct strmbase_so return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest); }
-static HRESULT source_get_media_type(struct strmbase_pin *This, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *This, unsigned int iPosition, AM_MEDIA_TYPE *pmt) { TransformFilter *pTransform = impl_from_source_IPin(&This->IPin_iface);
- if (iPosition < 0) - return E_INVALIDARG; if (iPosition > 0) return VFW_S_NO_MORE_ITEMS; CopyMediaType(pmt, &pTransform->pmt); diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b9ff1fdc039..de3bc996877 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1799,15 +1799,10 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP return S_OK; }
-static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int iPosition, AM_MEDIA_TYPE *pmt) { struct gstdemux_source *This = impl_source_from_IPin(&iface->IPin_iface);
- TRACE("(%p)->(%i, %p)\n", This, iPosition, pmt); - - if (iPosition < 0) - return E_INVALIDARG; - if (iPosition > 0) return VFW_S_NO_MORE_ITEMS;
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 17d22b4d8da..d3b9596375d 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -1295,12 +1295,10 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP return S_OK; }
-static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int iPosition, AM_MEDIA_TYPE *pmt) { QTOutPin *This = impl_sink_from_strmbase_pin(iface);
- if (iPosition < 0) - return E_INVALIDARG; if (iPosition > 0) return VFW_S_NO_MORE_ITEMS; CopyMediaType(pmt, This->pmt); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index fc18b22d6d3..65ba180caa7 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -46,7 +46,7 @@ typedef struct BasePinFuncTable { /* Required for QueryAccept(), Connect(), ReceiveConnection(). */ HRESULT (*pin_query_accept)(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt); /* Required for EnumMediaTypes(). */ - HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); + HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt); } BasePinFuncTable;
struct strmbase_source @@ -95,7 +95,7 @@ typedef struct BaseInputPinFuncTable { } BaseInputPinFuncTable;
/* Base Pin */ -HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); +HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt); LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin); ULONG WINAPI BasePinImpl_AddRef(IPin *iface); ULONG WINAPI BasePinImpl_Release(IPin *iface);