Ignore output callbacks with null parameters in iOS H264 encode.
This can occur if there are callbacks in-flight when the compression session is destroyed. Has been observed but is rare. Bug: webrtc:8489 Change-Id: I5d4b35c555f6ff68af48edfcc7acf53395fa86fe Reviewed-on: https://webrtc-review.googlesource.com/18220 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Anders Carlsson <andersc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20561}
This commit is contained in:
committed by
Commit Bot
parent
47836b4ebb
commit
ed2b1c954c
@ -151,10 +151,12 @@ void compressionOutputCallback(void *encoder,
|
||||
OSStatus status,
|
||||
VTEncodeInfoFlags infoFlags,
|
||||
CMSampleBufferRef sampleBuffer) {
|
||||
RTC_CHECK(params);
|
||||
if (!params) {
|
||||
// If there are pending callbacks when the encoder is destroyed, this can happen.
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<RTCFrameEncodeParams> encodeParams(
|
||||
reinterpret_cast<RTCFrameEncodeParams *>(params));
|
||||
RTC_CHECK(encodeParams->encoder);
|
||||
[encodeParams->encoder frameWasEncoded:status
|
||||
flags:infoFlags
|
||||
sampleBuffer:sampleBuffer
|
||||
|
||||
Reference in New Issue
Block a user