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 audio merging when segment doesn't start with a sync byte. #55

Merged
merged 1 commit into from
Nov 10, 2019

Conversation

gilbsgilbs
Copy link
Contributor

Fixes #53


Not sure my heuristic is the best, but I don't see how to do it differently. Let me know if you think it could be improved one way or another (e.g. looking for more than 3 consecutive sync bytes, calculating some checksums, etc…). By the way, my C is a bit rusted. Pardon me if I've made clumsy mistakes and please review carefully.

Also, I think the hls_download function leaks memory when the audio segment ends before the video segment. The video segment is never freed in such case. This was not introduced by this PR.

@gilbsgilbs gilbsgilbs force-pushed the fix-ts-headers branch 2 times, most recently from 9edbf77 to 6710ca2 Compare October 19, 2019 14:30
@selsta
Copy link
Owner

selsta commented Oct 22, 2019

Thank you! Will need some time until I can test and review this.

@selsta selsta merged commit d65e938 into selsta:master Nov 10, 2019
@selsta
Copy link
Owner

selsta commented Nov 10, 2019

Thank you for your contribution :)

@gilbsgilbs gilbsgilbs deleted the fix-ts-headers branch November 10, 2019 07:31
@gilbsgilbs
Copy link
Contributor Author

Hey, many thanks for the eventual review 🙏 .

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.

Audio ignored when the TS video file doesn't start with TS_SYNC_BYTE
2 participants