Commit 00a56e0
committed
[MSE][GStreamer] Dimension SourceBuffer size limit for all possible track types before init segment received
https://bugs.webkit.org/show_bug.cgi?id=267417
Reviewed by Philippe Normand.
SourceBuffer has separate max size limits for video, audio and text, but it has to parse the
init segment first to know if there are any video, audio or text tracks. At the very first
appendBuffer() there are not tracks parsed yet, so platformMaximumBufferSize() returns 0 (as
no tracks are there), and the limit is taken from MediaElementSession as audio limit 15MB as
no video track is present.
See: #1261
Inspired by the work of Andrzej Surdej <Andrzej_Surdej@comcast.com>.
This patch adjusts the platform limits for WPE so that they account for the possibility of
any (or even all) of the possible track types appearing when processing the init segment.
* Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::platformMaximumBufferSize const): Accumulate all the audio, video, text maximum sizes when no tracks have been detected yet.
Canonical link: https://commits.webkit.org/273039@main1 parent da14ef5 commit 00a56e0
1 file changed
Lines changed: 7 additions & 4 deletions
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
| |||
354 | 357 | | |
355 | 358 | | |
356 | 359 | | |
357 | | - | |
| 360 | + | |
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
363 | | - | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
369 | | - | |
| 372 | + | |
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
| |||
0 commit comments