Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FEC-10122): clear drop frame watcher and DRM selection #455

Merged
merged 7 commits into from
May 28, 2020
Merged

Conversation

Yuvalke
Copy link
Contributor

@Yuvalke Yuvalke commented May 24, 2020

Description of the Changes

destroy dropped frames watcher on reset to avoid a memory leak.
clear the DRM selection for the use case of loading another media without DRM keeps selection.

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

destroy dropped frames watcher on reset to avoid leak memory.
@Yuvalke Yuvalke requested a review from a team May 24, 2020 12:40
@Yuvalke Yuvalke self-assigned this May 24, 2020
@Yuvalke Yuvalke changed the title fix(FEC-10122): clear drop frame watcher on reset to avoid memory leak fix(FEC-10122): clear drop frame watcher May 24, 2020
@@ -242,6 +243,10 @@ export default class Html5 extends FakeEventTarget implements IEngine {
this._mediaSourceAdapter.destroy();
this._mediaSourceAdapter = null;
}
if (this._droppedFramesWatcher) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why you moved it down here? as it is dependent on _mediaSourceAdapter it could trow error if we destroy it after we destroy adapter
Same for reset above

Copy link
Contributor Author

@Yuvalke Yuvalke May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter but I changed it to keep the flow of code meaningful

OrenMe
OrenMe previously approved these changes May 27, 2020
@Yuvalke Yuvalke changed the title fix(FEC-10122): clear drop frame watcher fix(FEC-10122): clear drop frame watcher and drm selection May 28, 2020
@Yuvalke Yuvalke changed the title fix(FEC-10122): clear drop frame watcher and drm selection fix(FEC-10122): clear drop frame watcher and DRM selection May 28, 2020
@Yuvalke Yuvalke merged commit 6950806 into master May 28, 2020
@Yuvalke Yuvalke deleted the FEC-10122 branch May 28, 2020 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants