streamConfig->GetStreamCaps can return S_FALSE without a valid pmt
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
People
(Reporter: away, Unassigned)
References
(Blocks 1 open bug)
Details
Crash Data
SUCCEEDED(hr) or !FAILED(hr) are not sufficient for IAMStreamConfig::GetStreamCaps. In some cases the API can return S_FALSE without providing a pmt, which will lead to a null crash shortly after unless we explicitly test against S_OK.
The linked crash signature was due to this call: https://searchfox.org/mozilla-central/rev/465dbfe030dfec7756b9b523029e90d48dd5ecce/media/webrtc/trunk/webrtc/modules/video_capture/windows/video_capture_ds.cc#235
We should probably also fix an earlier attempt at papering this over: https://searchfox.org/mozilla-central/rev/5c8ea961d04767db723a0a15e3a8f7fbca154129/media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc#439
I'm not sure what to do about this last call. Should S_FALSE take the return -1
codepath? https://searchfox.org/mozilla-central/rev/5c8ea961d04767db723a0a15e3a8f7fbca154129/media/webrtc/trunk/webrtc/modules/video_capture/windows/device_info_ds.cc#467
Updated•6 years ago
|
Description
•