Bug 1181265 - wallpaper over windows (driver?) returning null ptr to GetStreamCaps r=pkerr
authorRandell Jesup <rjesup@jesup.org>
Thu, 09 Jul 2015 14:23:58 -0400
changeset 252172 e22aa88ad9802a45ffe8641798641e8e90540ae4
parent 252171 b5ad4fc404d74957bf15254d609ac5649dcd71eb
child 252173 ae48f4bcb30f8d31f8db0b32e6ec0e1bea3ee141
push id29025
push userkwierso@gmail.com
push dateFri, 10 Jul 2015 01:01:33 +0000
treeherdermozilla-central@2c91d57441fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspkerr
bugs1181265
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1181265 - wallpaper over windows (driver?) returning null ptr to GetStreamCaps r=pkerr
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 =