Closed Bug 1523407 Opened 5 years ago Closed 5 years ago

streamConfig->GetStreamCaps can return S_FALSE without a valid pmt

Categories

(Core :: WebRTC: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1523412

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

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.