-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Hi!
I found a nice memory leak issue in Chromium based browsers due to a V8 engine string slicing problem.
More about it here: https://bugs.chromium.org/p/v8/issues/detail?id=2869
This causes a longer DVR live stream (tested with 10 hours long) to crash in 30-40 minutes in video.js 7+ due to extreme memory consuption.
A possible solution is just a small hack that's required for every parsed string.
For example:
if (line[0] !== "#") {
this.trigger("data", {
type: "uri",
uri: (" " + line).substring(1), // <-------
});
return;
}match = /^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(newLine);
if (match) {
event = {
type: 'tag',
tagType: 'program-date-time'
};
if (match[1]) {
event.dateTimeString = (" " + match[1]).substring(1); // <-------
event.dateTimeObject = new Date(match[1]);
}
this.trigger('data', event);
return;
}These modifications reduced the players memory consuption from 2 GB to 30 MB.
Best regards,
zsilbi
gyerts and activeseaport
Metadata
Metadata
Assignees
Labels
No labels

