[PATCH 5/6] qcap/videocapture: Reimplement source_get_media_type().
Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> --- dlls/qcap/vfwcapture.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 85d765415b..51ce877837 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -519,11 +519,13 @@ static HRESULT source_get_media_type(struct strmbase_pin *pin, VfwCapture *filter = impl_from_strmbase_pin(pin); AM_MEDIA_TYPE *vfw_pmt; HRESULT hr; + LONG count; - if (iPosition > 0) + count = qcap_driver_get_caps_count(filter->driver_info); + if (iPosition >= count) return VFW_S_NO_MORE_ITEMS; - hr = qcap_driver_get_format(filter->driver_info, &vfw_pmt); + hr = qcap_driver_get_caps(filter->driver_info, iPosition, &vfw_pmt, NULL); if (SUCCEEDED(hr)) { CopyMediaType(pmt, vfw_pmt); DeleteMediaType(vfw_pmt); -- 2.26.1
participants (1)
-
Jactry Zeng