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

Fix flash tag trimming to not append duplicate tags #137

Merged
merged 1 commit into from
Feb 28, 2017

Conversation

mjneil
Copy link
Contributor

@mjneil mjneil commented Feb 28, 2017

#136 introduced a change to track the last pts values of audio and video tags appended to the buffer to use as the target trim point for the next segment. This caused duplicate tags (usually the final GOP of the last segment appended) to be appended due to a >=. This change adds a fudge factor of 0.1 to the target pts when using the last stored pts value to avoid mistakenly appending a duplicate GOP

@forbesjo forbesjo self-requested a review February 28, 2017 20:00
@@ -377,7 +377,7 @@ export default class FlashSourceBuffer extends videojs.EventTarget {
videoTargetPts *= 1e3;
videoTargetPts += this.basePtsOffset_;
} else {
videoTargetPts = this.videoBufferEnd_;
videoTargetPts = this.videoBufferEnd_ + 0.1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like these need comments

@forbesjo
Copy link
Contributor

Looks good to me

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

Successfully merging this pull request may close these issues.

2 participants