Skip to content

Bug: Memory leak in Timed Metadata TextTrack cues #1591

Description

@pmendozav

In the PlaylistController class, when creating mainSegmentLoader_, the constructor receives the inbandTextTracks_ instance from the controller:

    const segmentLoaderSettings = {
      // ...
      inbandTextTracks: this.inbandTextTracks_,
      // ...
    };

    this.mainSegmentLoader_ =
      new SegmentLoader(merge(segmentLoaderSettings, {

The SegmentLoader class has a remove method that cleans inbandTextTracks_ and controls its size. However, PlaylistController.inbandTextTracks_ never clears its content. In fact, we can verify that the references to inbandTextTracks_ in PlaylistController and SegmentLoader are not the same using:

player.tech_.vhs.playlistController_.mainSegmentLoader_.inbandTextTracks_ === player.tech_.vhs.playlistController_.inbandTextTracks_

As a result, player.tech_.vhs.playlistController_.inbandTextTracks_.metadataTrack_.cues_ grows indefinitely.

Image

Steps to reproduce:

Unfortunately, I cannot share the live stream URL. However, it can be verified that the references of inbandTextTracks_ in PlaylistController and SegmentLoader are not the same with any URL on Netlify.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions