Skip to content

Commit 2c8a583

Browse files
emutavchieocanha
authored andcommitted
[MSE][GStreamer] update maximum buffer size after receiving first init segment
https://bugs.webkit.org/show_bug.cgi?id=296059 Reviewed by Xabier Rodriguez-Calvar. The current SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment() code only calls SourceBufferPrivate::setMaximumBufferSize() on new init segments when the segment has (at least) a video track. Maximum buffer size is managed with high granularity in WPE by using the MSE_MAX_BUFFER_SIZE environment variable. For that reason, that call must happen independently of the kind of tracks present (at least on the WPE platform). This will ensure that the proper frame eviction code in SourceBufferPrivate::setMaximumBufferSize() is called in all cases. See: #1534 This patch calls SourceBufferPrivate::setMaximumBufferSize() inconditionally on the WPE platform. Original author: Eugene Mutavchi <Ievgen_Mutavchi@comcast.com> * Source/WebCore/Modules/mediasource/SourceBuffer.cpp: (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Disable the if, so the call happens inconditionally on WPE. Canonical link: https://commits.webkit.org/297674@main
1 parent 62328d8 commit 2c8a583

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Source/WebCore/Modules/mediasource/SourceBuffer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,9 @@ Ref<MediaPromise> SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegme
10421042
// 5.6 Set first initialization segment flag to true.
10431043
m_receivedFirstInitializationSegment = true;
10441044

1045+
#if !PLATFORM(WPE)
10451046
if (hasVideo())
1047+
#endif
10461048
m_private->setMaximumBufferSize(maximumBufferSize());
10471049
}
10481050

0 commit comments

Comments
 (0)