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

Changeset 284831 in webkit


Ignore:
Timestamp:
Oct 25, 2021, 2:51:00 PM (5 years ago)
Author:
Alan Coon
Message:

Cherry-pick r283975. rdar://problem/84630618

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.

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

Location:
branches/safari-612-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612-branch/Source/WebKit/ChangeLog

    r284829 r284831  
     12021-10-25  Null  <null@apple.com>
     2
     3        Cherry-pick r283975. rdar://problem/84630618
     4
     5    Error the encoder in case we cannot create a RemoteVideoSample
     6    https://bugs.webkit.org/show_bug.cgi?id=231505
     7    <rdar://83975229>
     8   
     9    Reviewed by Eric Carlson.
     10   
     11    * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
     12    (WebKit::LibWebRTCCodecs::encodeFrame):
     13    RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null
     14    due to VTPixelBufferConformerCopyConformedPixelBuffer failing.
     15    In that case, we error the encoder instead of trying to encode the frame.
     16   
     17   
     18    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     19
     20    2021-10-12  Youenn Fablet  <youenn@apple.com>
     21
     22            Error the encoder in case we cannot create a RemoteVideoSample
     23            https://bugs.webkit.org/show_bug.cgi?id=231505
     24            <rdar://83975229>
     25
     26            Reviewed by Eric Carlson.
     27
     28            * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:
     29            (WebKit::LibWebRTCCodecs::encodeFrame):
     30            RemoteVideoSample::create can return nullptr if we cannot get an IOSurface from the pixel buffer or if pixel buffer is null
     31            due to VTPixelBufferConformerCopyConformedPixelBuffer failing.
     32            In that case, we error the encoder instead of trying to encode the frame.
     33
    1342021-10-25  Null  <null@apple.com>
    235
  • branches/safari-612-branch/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp

    r284392 r284831  
    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.