-
Notifications
You must be signed in to change notification settings - Fork 52
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
Update the handling of metadata refinement #3
Conversation
This updates the naming of cues so they are in line with what is used in the matroska/webm specs and will be written appropriately.
…ment behaviour. In order to calculate correct offsets when rewriting metadata, we need to know the segment offset. This commits passes that length and updates the handling to do so. This also addresses an edge case where if during rewriting the varint lengths containing offsets are widened, those offsets could become incorrect. To address this, the new metadata is recaclulated until its length becomes stable, indicating no changes in varint sizes.
before
after
The I am currently correcting this problem, but I will merge for the moment. |
fix the problem: cd7e188 |
I see there's been a large rework in another commit, but to clarify the above: For 2. I think dataStart is returning in incorrect values (in my testing it was doing so), which is why I used the alternative calculation. I'm not sure I follow the issues in 3. The produced file appears to have incorrect seekhead and cue offsets. I think this is because of the changes in 0986b52 (the dataStart issue). Firefox fails to play because of the incorrect seek data. |
Try this sample: https://jsfiddle.net/ub2jej7c/ I checked on Firefox Nightly 55.0a1 (2017-05-08) (64 bit) |
Agreed that this is a Firefox bug, and don't think it's to do with the rewriting we're doing here. I had thought this was a FF regression, but am unable to find a time that it worked. I will raise an issue on the Firefox side. Thanks for pointing it out. |
Thank you your pull request 😄 |
This PR improves upon the existing handling of metadata refinement in the following ways: