Skip to content

Commit da14ef5

Browse files
committed
[MSE] Reset extra memory cost inside removedFromMediaSource()
https://bugs.webkit.org/show_bug.cgi?id=267350 Reviewed by Xabier Rodriguez-Calvar. When the SourceBuffer is removed from a MediaSource, its TrackBuffers are cleared (and so is its data, which can take a good amount of memory), but the SourceBuffer still accounts for the cost of its old data, as m_extraMemoryCost isn't reset to zero. See: #1264 This patch resets m_extraMemoryCost when the SourceBuffer is removed. Original author: Andrzej Surdej <Andrzej_Surdej@comcast.com> * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::removedFromMediaSource): Reset m_extraMemoryCost. Canonical link: https://commits.webkit.org/272908@main
1 parent d7dbe70 commit da14ef5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Source/WebCore/Modules/mediasource/SourceBuffer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ void SourceBuffer::removedFromMediaSource()
447447
m_private->removedFromMediaSource();
448448
m_private->setIsAttached(false);
449449
m_source = nullptr;
450+
m_extraMemoryCost = 0;
450451
}
451452

452453
void SourceBuffer::seekToTime(const MediaTime& time)

0 commit comments

Comments
 (0)