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

Make sure there's only one metadata at at given frame position. #2786

Merged
merged 1 commit into from
Dec 13, 2022

Conversation

toots
Copy link
Member

@toots toots commented Dec 12, 2022

While debugging the new tracks branch I cam accros a situation where:

The real underlying problem is that our filling boundaries currently aren't mutually exclusive. Break, for instance, can be added several time at the same position to specify empty tracks, and metadata are usually added at the same time.

Thus, until we finally tackle the immutable content/streaming API rewrite, it seems to be that the best course of action is to make sure that metadata (not breaks!) are unique when sorted by position.

This PR does that with a quick sort_uniq. The other alternative would be a hash or map but this is too involved since we know we will eventually rework the whole thing.

@toots toots marked this pull request as ready for review December 13, 2022 10:51
@toots toots enabled auto-merge (squash) December 13, 2022 10:52
@toots toots disabled auto-merge December 13, 2022 10:52
@toots toots merged commit 76db9d3 into main Dec 13, 2022
@toots toots deleted the remove-duplicate-metadata branch December 13, 2022 10:52
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.

1 participant