Title: [283975] trunk/Source/WebKit
- Revision
- 283975
- Author
- [email protected]
- Date
- 2021-10-12 02:45:17 -0700 (Tue, 12 Oct 2021)
Log Message
Error the encoder in case we cannot create a RemoteVideoSample
https://bugs.webkit.org/show_bug.cgi?id=231505
<rdar://83975229>
Reviewed by Eric Carlson.
* WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
(WebKit::LibWebRTCCodecs::encodeFrame):
RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null
due to VTPixelBufferConformerCopyConformedPixelBuffer failing.
In that case, we error the encoder instead of trying to encode the frame.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (283974 => 283975)
--- trunk/Source/WebKit/ChangeLog 2021-10-12 09:30:55 UTC (rev 283974)
+++ trunk/Source/WebKit/ChangeLog 2021-10-12 09:45:17 UTC (rev 283975)
@@ -1,3 +1,17 @@
+2021-10-12 Youenn Fablet <[email protected]>
+
+ Error the encoder in case we cannot create a RemoteVideoSample
+ https://bugs.webkit.org/show_bug.cgi?id=231505
+ <rdar://83975229>
+
+ Reviewed by Eric Carlson.
+
+ * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
+ (WebKit::LibWebRTCCodecs::encodeFrame):
+ RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null
+ due to VTPixelBufferConformerCopyConformedPixelBuffer failing.
+ In that case, we error the encoder instead of trying to encode the frame.
+
2021-10-11 Myles C. Maxfield <[email protected]>
[GPU Process] Unique RenderingResourceIdentifiers Part 8: Consolidate DisplayList::ResourceHeap
Modified: trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp (283974 => 283975)
--- trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp 2021-10-12 09:30:55 UTC (rev 283974)
+++ trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp 2021-10-12 09:45:17 UTC (rev 283975)
@@ -31,6 +31,7 @@
#include "GPUProcessConnection.h"
#include "LibWebRTCCodecsMessages.h"
#include "LibWebRTCCodecsProxyMessages.h"
+#include "Logging.h"
#include "WebCoreArgumentCoders.h"
#include "WebProcess.h"
#include <WebCore/CVUtilities.h>
@@ -447,6 +448,10 @@
if (!sample) {
// FIXME: Optimize this code path, currently we have non BGRA for muted frames at least.
sample = RemoteVideoSample::create(convertToBGRA(pixelBuffer.get()), MediaTime(frame.timestamp_us() * 1000, 1000000), toMediaSampleVideoRotation(frame.rotation()));
+ if (!sample) {
+ RELEASE_LOG_ERROR(WebRTC, "Unable to convert remote video sample");
+ return WEBRTC_VIDEO_CODEC_ERROR;
+ }
}
encoder.connection->send(Messages::LibWebRTCCodecsProxy::EncodeFrame { encoder.identifier, *sample, frame.timestamp(), shouldEncodeAsKeyFrame }, 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes