Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

fix segment time mapping for fmp4 playback #1067

Merged
merged 2 commits into from
Apr 10, 2017

Conversation

mjneil
Copy link
Contributor

@mjneil mjneil commented Mar 30, 2017

Description

Segment start and end times were being miscalculated for fragmented mp4s when timestampOffset was being set.

Specific Changes proposed

Use segmentInfo.startOfSegment for setting the time mapping instead of segmentInfo.timestampOffset. These values are the same except in the fmp4 case when timestampOffset is adjusted to account for offset start times since fmp4 playback uses native source buffers instead of our VirtualSourceBuffer and transmuxer for setting baseMediaDecodeTime properly.

Requirements Checklist

  • Feature implemented / Bug fixed
  • Unit Tests updated or fixed
  • Reviewed by Two Core Contributors

time: segmentInfo.timestampOffset,
mapping: segmentInfo.timestampOffset - timingInfo.start
time: segmentInfo.startOfSegment,
mapping: segmentInfo.startOfSegment - timingInfo.start
Copy link
Member

Choose a reason for hiding this comment

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

I think to ensure we don't introduce a regression in the future, we need a unit test around modification of timestampOffset (which we do in mp4Probe) to make sure it doesn't change the start and end time of the segment.

@mjneil mjneil merged commit 0951dd5 into videojs:master Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants