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

ConcatenatingMediaSource using useLazyPreparation lost start offset for MP4 videos #5350

Closed
catbaxter opened this issue Jan 8, 2019 · 2 comments
Assignees
Labels

Comments

@catbaxter
Copy link

catbaxter commented Jan 8, 2019

  1. Issue description

ConcatenatingMediaSource using useLazyPreparation losts start offset for MP4 videos

  1. Reproduction steps

Take com.google.android.exoplayer2.demo.PlayerActivity.java.
Change the line no. 447

mediaSource =mediaSources.length == 1 ? mediaSources[0] : new ConcatenatingMediaSource(mediaSources);

to

mediaSource = new ConcatenatingMediaSource(true, true,
new ShuffleOrder.DefaultShuffleOrder(0),
mediaSources);
startWindow = 0;
startPosition = 5 * 1000;

and run the example using Misc -> Dizzy (MP4). You'll see the 5 seconds start offset on the timeline, but right after the zero offset.

  1. Version of ExoPlayer being used

2.9.3

@tonihei tonihei self-assigned this Jan 8, 2019
@tonihei tonihei added the bug label Jan 8, 2019
@tonihei
Copy link
Collaborator

tonihei commented Jan 8, 2019

Thanks for reporting. I can reproduce the issue and we'll take a look soon.

ojw28 pushed a commit that referenced this issue Jan 17, 2019
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
ojw28 pushed a commit that referenced this issue Jan 17, 2019
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
@tonihei
Copy link
Collaborator

tonihei commented Jan 18, 2019

Closing as fixed.

@tonihei tonihei closed this as completed Jan 18, 2019
@google google locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants