ObjC: Add null checks to HW encoder compressionOutputCallback

This will help debugging.

BUG=b/65254613

Review-Url: https://codereview.webrtc.org/3012693002
Cr-Commit-Position: refs/heads/master@{#19640}
This commit is contained in:
magjed
2017-09-01 06:32:57 -07:00
committed by Commit Bot
parent 1acbd68718
commit 85d18d43ad

View File

@ -148,8 +148,10 @@ void compressionOutputCallback(void *encoder,
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