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

Changeset 277345 in webkit


Ignore:
Timestamp:
May 11, 2021, 5:46:17 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize.
https://bugs.webkit.org/show_bug.cgi?id=225630

Patch by Toshio Ogasawara <toshio.ogasawara@access-company.com> on 2021-05-11
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-append-buffer-full-quota-exceeded-error.html

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferInternal):

  • platform/graphics/SourceBufferPrivate.cpp:

(WebCore::SourceBufferPrivate::evictCodedFrames):

  • platform/graphics/SourceBufferPrivate.h:

LayoutTests:

  • media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt: Added.
  • media/media-source/media-source-append-buffer-full-quota-exceeded-error.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r277340 r277345  
     12021-05-11  Toshio Ogasawara  <toshio.ogasawara@access-company.com>
     2
     3        [MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize.
     4        https://bugs.webkit.org/show_bug.cgi?id=225630
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/media-source/media-source-append-buffer-full-quota-exceeded-error-expected.txt: Added.
     9        * media/media-source/media-source-append-buffer-full-quota-exceeded-error.html: Added.
     10
    1112021-05-11  Robert Jenner  <jenner@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r277343 r277345  
     12021-05-11  Toshio Ogasawara  <toshio.ogasawara@access-company.com>
     2
     3        [MSE] QuotaExceededError Exception not thrown even if the sum of totalTrackBufferSize and appendBuffer size exceeds maximumBufferSize.
     4        https://bugs.webkit.org/show_bug.cgi?id=225630
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: media/media-source/media-source-append-buffer-full-quota-exceeded-error.html
     9
     10        * Modules/mediasource/SourceBuffer.cpp:
     11        (WebCore::SourceBuffer::appendBufferInternal):
     12        * platform/graphics/SourceBufferPrivate.cpp:
     13        (WebCore::SourceBufferPrivate::evictCodedFrames):
     14        * platform/graphics/SourceBufferPrivate.h:
     15
    1162021-05-11  Sihui Liu  <sihui_liu@apple.com>
    217
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp

    r276414 r277345  
    492492
    493493    // 5. If the buffer full flag equals true, then throw a QuotaExceededError exception and abort these step.
    494     if (m_private->bufferFull()) {
     494    if (m_private->bufferFull() || m_private->totalTrackBufferSizeInBytes() + m_pendingAppendData.capacity() + size >= maximumBufferSize()) {
    495495        ERROR_LOG(LOGIDENTIFIER, "buffer full, failing with QuotaExceededError error");
    496496        return Exception { QuotaExceededError };
  • trunk/Source/WebCore/platform/graphics/SourceBufferPrivate.cpp

    r276414 r277345  
    640640    // 1. Let new data equal the data that is about to be appended to this SourceBuffer.
    641641    // 2. If the buffer full flag equals false, then abort these steps.
    642     if (!m_bufferFull)
     642    if (!m_bufferFull && totalTrackBufferSizeInBytes() + pendingAppendDataCapacity + newDataSize < maximumBufferSize)
    643643        return;
    644644
  • trunk/Source/WebCore/platform/graphics/SourceBufferPrivate.h

    r277003 r277345  
    109109
    110110    MediaTime timestampOffset() const { return m_timestampOffset; }
     111    uint64_t totalTrackBufferSizeInBytes() const;
    111112
    112113    struct TrackBuffer {
     
    169170    void setBufferFull(bool bufferFull) { m_bufferFull = bufferFull; }
    170171    void provideMediaData(const AtomString& trackID);
    171     uint64_t totalTrackBufferSizeInBytes() const;
    172172
    173173    SourceBufferPrivateClient* m_client { nullptr };
Note: See TracChangeset for help on using the changeset viewer.