⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 283975 in webkit


Ignore:
Timestamp:
Oct 12, 2021, 2:45:17 AM (5 years ago)
Author:
youenn@apple.com
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.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r283971 r283975  
     12021-10-12  Youenn Fablet  <youenn@apple.com>
     2
     3        Error the encoder in case we cannot create a RemoteVideoSample
     4        https://bugs.webkit.org/show_bug.cgi?id=231505
     5        <rdar://83975229>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
     10        (WebKit::LibWebRTCCodecs::encodeFrame):
     11        RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null
     12        due to VTPixelBufferConformerCopyConformedPixelBuffer failing.
     13        In that case, we error the encoder instead of trying to encode the frame.
     14
    1152021-10-11  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp

    r283116 r283975  
    3232#include "LibWebRTCCodecsMessages.h"
    3333#include "LibWebRTCCodecsProxyMessages.h"
     34#include "Logging.h"
    3435#include "WebCoreArgumentCoders.h"
    3536#include "WebProcess.h"
     
    448449        // FIXME: Optimize this code path, currently we have non BGRA for muted frames at least.
    449450        sample = RemoteVideoSample::create(convertToBGRA(pixelBuffer.get()), MediaTime(frame.timestamp_us() * 1000, 1000000), toMediaSampleVideoRotation(frame.rotation()));
     451        if (!sample) {
     452            RELEASE_LOG_ERROR(WebRTC, "Unable to convert remote video sample");
     453            return WEBRTC_VIDEO_CODEC_ERROR;
     454        }
    450455    }
    451456
Note: See TracChangeset for help on using the changeset viewer.