mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-12 12:21:30 +00:00
mfvideosrc: check HRESULT of CreateClassEnumerator correctly
Fixes a crash during direct show device enumeration Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1599 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3460>
This commit is contained in:
parent
63ff99ca8e
commit
47b8762774
1 changed files with 2 additions and 1 deletions
|
@ -1023,7 +1023,8 @@ gst_mf_dshow_enum_device (GstMFCaptureDShow * self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gst_mf_result (hr))
|
// Documentation states that the result of CreateClassEnumerator must be checked against S_OK
|
||||||
|
if (hr != S_OK)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (guint i = 0;; i++) {
|
for (guint i = 0;; i++) {
|
||||||
|
|
Loading…
Reference in a new issue