Bug 1181265 - Wallpaper over windows (driver?) returning null ptr to GetStreamCaps. r=pkerr, a=lmandel
authorRandell Jesup <rjesup@jesup.org>
Thu, 09 Jul 2015 14:23:58 -0400
changeset 281632 0bb79a7528f516fc4f8cfb3b8135e149adf23475
parent 281631 9a017f01afea347b1000d859a16f9c12a4c79442
child 281633 001ba3f6d57265ca1e8704edd8d27190f7d7e5f4
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspkerr, lmandel
bugs1181265
milestone41.0a2
Bug 1181265 - Wallpaper over windows (driver?) returning null ptr to GetStreamCaps. r=pkerr, a=lmandel
media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc
--- a/media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc
@@ -487,17 +487,18 @@ int32_t DeviceInfoDS::CreateCapabilityMa
     bool supportFORMAT_VideoInfo2 = false;
     bool supportFORMAT_VideoInfo = false;
     bool foundInterlacedFormat = false;
     GUID preferedVideoFormat = FORMAT_VideoInfo;
     for (int32_t tmp = 0; tmp < count; ++tmp)
     {
         hr = streamConfig->GetStreamCaps(tmp, &pmt,
                                          reinterpret_cast<BYTE*> (&caps));
-        if (!FAILED(hr))
+        // Bug 1181265 - perhaps a helper dll returns success with nullptr
+        if (!FAILED(hr) && pmt)
         {
             if (pmt->majortype == MEDIATYPE_Video
                 && pmt->formattype == FORMAT_VideoInfo2)
             {
                 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCapture, _id,
                              " Device support FORMAT_VideoInfo2");
                 supportFORMAT_VideoInfo2 = true;
                 VIDEOINFOHEADER2* h =