[PATCH v2 6/6] qcap/videocapture: Reimplement source_get_media_type().
Jactry Zeng
jzeng at codeweavers.com
Tue Apr 28 09:13:41 CDT 2020
Signed-off-by: Jactry Zeng <jzeng at 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 967bdba22e..14542ec7fc 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -522,11 +522,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.2
More information about the wine-devel
mailing list