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: on flush if a pmt has not been emitted and we have one, emit it #388

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

brandonocasey
Copy link
Contributor

Always emit trackinfo, even if we didn't process a pmt.

lib/m2ts/m2ts.js Outdated
tracks: []
};
// translate audio and video streams to tracks
if (programMapTable.video !== null) {
Copy link
Member

Choose a reason for hiding this comment

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

looks like we need to null check programMapTable itself here and below too, likely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, I also realized that flushStreams isn't only called on flush which gave us a lot more trackinfo events than we wanted. I moved this code to this.flush and the unit tests in vhs pass 💯

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

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

Verified

@brandonocasey brandonocasey merged commit 67b4aab into main Jun 24, 2021
@brandonocasey brandonocasey deleted the fix/always-emit-trackinfo branch June 24, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants