Skip to content

Decoder reuse in MediaSessionConnector #5891

@AndrazP

Description

@AndrazP

[REQUIRED] Searched documentation and issues

Recent Improved decoder reuse in ExoPlayer blog post explains how to make sure your app benefits from decoder reuse:

When re-preparing the player with a different video, call prepare() with the new MediaSource without calling stop() first. This is because by default, ExoPlayer will still release decoders when stop() is called.

I noticed MediaSessionConnector.java calls stopPlayerForPrepare(boolean playWhenReady) before preparing new source.

[REQUIRED] Question

Is there a reason why MediaSessionConnector calls player.stop() before preparing new source? Is this not against best practices for decoder reuse?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions