REGRESSION (r237075): webrtc/video-replace-muted-track.html is Crashing
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2018 17:54:00 +0000 (17:54 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Oct 2018 17:54:00 +0000 (17:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190646

Reviewed by Eric Carlson.

Do not use VCP pixel buffer pool at all.
RealtimeOutgoingVideoSource makes sure to send the frame in the right format.
Tested by ensuring test no longer crashes.

* Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
(-[RTCSingleVideoEncoderH264 resetCompressionSessionIfNeededWithFrame:]):
(-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237226 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm

index 0062954..2edfa2a 100644 (file)
@@ -1,3 +1,18 @@
+2018-10-17  Youenn Fablet  <youenn@apple.com>
+
+        REGRESSION (r237075): webrtc/video-replace-muted-track.html is Crashing
+        https://bugs.webkit.org/show_bug.cgi?id=190646
+
+        Reviewed by Eric Carlson.
+
+        Do not use VCP pixel buffer pool at all.
+        RealtimeOutgoingVideoSource makes sure to send the frame in the right format.
+        Tested by ensuring test no longer crashes.
+
+        * Source/webrtc/sdk/objc/components/video_codec/RTCVideoEncoderH264.mm:
+        (-[RTCSingleVideoEncoderH264 resetCompressionSessionIfNeededWithFrame:]):
+        (-[RTCSingleVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):
+
 2018-10-16  Youenn Fablet  <youenn@apple.com>
 
         Support RTCConfiguration.certificates
index f1ca6a2..a14357f 100644 (file)
@@ -541,6 +541,11 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
   OSType framePixelFormat = [self pixelFormatOfFrame:frame];
 
   if (_compressionSession) {
+#if defined(WEBRTC_WEBKIT_BUILD)
+    if (!_pixelBufferPool) {
+      return NO;
+    }
+#endif
     // The pool attribute `kCVPixelBufferPixelFormatTypeKey` can contain either an array of pixel
     // formats or a single pixel format.
     NSDictionary *poolAttributes =
@@ -734,10 +739,11 @@ CFStringRef ExtractProfile(webrtc::SdpVideoFormat videoFormat) {
 #endif
   [self configureCompressionSession];
 
+#if !defined(WEBRTC_WEBKIT_BUILD)
   // The pixel buffer pool is dependent on the compression session so if the session is reset, the
   // pool should be reset as well.
   _pixelBufferPool = CompressionSessionGetPixelBufferPool(_compressionSession);
-
+#endif
   return WEBRTC_VIDEO_CODEC_OK;
 }