commit | e460f6e8e1f04bdc670763841803c0927234d528 | [log] [tgz] |
---|---|---|
author | magjed <magjed@webrtc.org> | Fri Sep 01 13:32:57 2017 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Sep 01 13:32:57 2017 |
tree | 87e6e58b0fdabe5b4fb65ad57c15a255fc0b7ba8 | |
parent | 36189cde64e4cd9fc90ab3a6f45d9c37efaf625c [diff] |
ObjC: Add null checks to HW encoder compressionOutputCallback This will help debugging. BUG=b/65254613 Review-Url: https://codereview.webrtc.org/3012693002 Cr-Original-Commit-Position: refs/heads/master@{#19640} Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 85d18d43adc679d8d3160106a918fe05fdbc0755
diff --git a/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm index a410e27..0fcefee 100644 --- a/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm +++ b/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
@@ -148,8 +148,10 @@ OSStatus status, VTEncodeInfoFlags infoFlags, CMSampleBufferRef sampleBuffer) { + RTC_CHECK(params); std::unique_ptr<RTCFrameEncodeParams> encodeParams( reinterpret_cast<RTCFrameEncodeParams *>(params)); + RTC_CHECK(encodeParams->encoder); [encodeParams->encoder frameWasEncoded:status flags:infoFlags sampleBuffer:sampleBuffer