diff --git a/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm b/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm index ebfba2c132..9afd54f55f 100644 --- a/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm +++ b/sdk/objc/api/video_codec/RTCWrappedNativeVideoEncoder.mm @@ -63,7 +63,7 @@ return nil; } -- (RTCVideoEncoderQpThresholds *)scalingSettings { +- (nullable RTCVideoEncoderQpThresholds *)scalingSettings { RTC_NOTREACHED(); return nil; } diff --git a/sdk/objc/base/RTCVideoEncoder.h b/sdk/objc/base/RTCVideoEncoder.h index 41e78badea..b566615bd9 100644 --- a/sdk/objc/base/RTCVideoEncoder.h +++ b/sdk/objc/base/RTCVideoEncoder.h @@ -42,7 +42,7 @@ RTC_EXPORT /** Returns QP scaling settings for encoder. The quality scaler adjusts the resolution in order to * keep the QP from the encoded images within the given range. Returning nil from this function * disables quality scaling. */ -- (RTCVideoEncoderQpThresholds *)scalingSettings; +- (nullable RTCVideoEncoderQpThresholds *)scalingSettings; @end diff --git a/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm b/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm index 6cd56debc8..16ad1ff47a 100644 --- a/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm +++ b/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm @@ -753,7 +753,7 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) { _bitrateAdjuster->Update(frame.buffer.length); } -- (RTCVideoEncoderQpThresholds *)scalingSettings { +- (nullable RTCVideoEncoderQpThresholds *)scalingSettings { return [[RTCVideoEncoderQpThresholds alloc] initWithThresholdsLow:kLowH264QpThreshold high:kHighH264QpThreshold]; }