Title: [232322] trunk/Source/ThirdParty/libwebrtc
- Revision
- 232322
- Author
- [email protected]
- Date
- 2018-05-30 17:18:46 -0700 (Wed, 30 May 2018)
Log Message
Fix leak of a CVPixelBufferRef due to early rerturn in -[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]
<https://webkit.org/b/186114>
<rdar://problem/40668097>
Reviewed by Eric Carlson.
* Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:
(-[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]):
Call CVBufferRelease(pixelBuffer) before early return to free
it.
* WebKit/0010-Fix-RTCVideoEncoderH264-CVPixelBuffer-leak.patch: Add.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (232321 => 232322)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2018-05-31 00:08:35 UTC (rev 232321)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2018-05-31 00:18:46 UTC (rev 232322)
@@ -1,3 +1,17 @@
+2018-05-30 David Kilzer <[email protected]>
+
+ Fix leak of a CVPixelBufferRef due to early rerturn in -[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]
+ <https://webkit.org/b/186114>
+ <rdar://problem/40668097>
+
+ Reviewed by Eric Carlson.
+
+ * Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:
+ (-[RTCVideoEncoderH264 encode:codecSpecificInfo:frameTypes:]):
+ Call CVBufferRelease(pixelBuffer) before early return to free
+ it.
+ * WebKit/0010-Fix-RTCVideoEncoderH264-CVPixelBuffer-leak.patch: Add.
+
2018-05-27 David Kilzer <[email protected]>
[iOS] Fix warnings about leaks found by clang static analyzer
Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm (232321 => 232322)
--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm 2018-05-31 00:08:35 UTC (rev 232321)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm 2018-05-31 00:18:46 UTC (rev 232322)
@@ -429,6 +429,7 @@
}
_frameScaleBuffer.shrink_to_fit();
if (![rtcPixelBuffer cropAndScaleTo:pixelBuffer withTempBuffer:_frameScaleBuffer.data()]) {
+ CVBufferRelease(pixelBuffer);
return WEBRTC_VIDEO_CODEC_ERROR;
}
}
Added: trunk/Source/ThirdParty/libwebrtc/WebKit/0010-Fix-RTCVideoEncoderH264-CVPixelBuffer-leak.patch (0 => 232322)
--- trunk/Source/ThirdParty/libwebrtc/WebKit/0010-Fix-RTCVideoEncoderH264-CVPixelBuffer-leak.patch (rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/WebKit/0010-Fix-RTCVideoEncoderH264-CVPixelBuffer-leak.patch 2018-05-31 00:18:46 UTC (rev 232322)
@@ -0,0 +1,12 @@
+diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
+index 42f940426ae..16a841d9458 100644
+--- a/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
++++ b/Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm
+@@ -429,6 +429,7 @@ - (NSInteger)encode:(RTCVideoFrame *)frame
+ }
+ _frameScaleBuffer.shrink_to_fit();
+ if (![rtcPixelBuffer cropAndScaleTo:pixelBuffer withTempBuffer:_frameScaleBuffer.data()]) {
++ CVBufferRelease(pixelBuffer);
+ return WEBRTC_VIDEO_CODEC_ERROR;
+ }
+ }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes