From: Jactry Zeng jzeng@codeweavers.com
Signed-off-by: Jactry Zeng jzeng@codeweavers.com Signed-off-by: Zebediah Figura z.figura12@gmail.com --- v3: rename "iPosition" to "index" while we're at it
dlls/qcap/vfwcapture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 71ca4502b9..7b759f0173 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -515,16 +515,16 @@ static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE }
static HRESULT source_get_media_type(struct strmbase_pin *pin, - unsigned int iPosition, AM_MEDIA_TYPE *pmt) + unsigned int index, AM_MEDIA_TYPE *pmt) { VfwCapture *filter = impl_from_strmbase_pin(pin); AM_MEDIA_TYPE *vfw_pmt; HRESULT hr;
- if (iPosition > 0) + if (index >= qcap_driver_get_caps_count(filter->driver_info)) return VFW_S_NO_MORE_ITEMS;
- hr = qcap_driver_get_format(filter->driver_info, &vfw_pmt); + hr = qcap_driver_get_caps(filter->driver_info, index, &vfw_pmt, NULL); if (SUCCEEDED(hr)) { CopyMediaType(pmt, vfw_pmt); DeleteMediaType(vfw_pmt);