Repository navigation
Conversation
Add a [[reset generation]] internal slot to AudioDecoder, VideoDecoder, AudioEncoder, and VideoEncoder. Increment it on reset and verify it before emitting each output and before resolving flush promises. Fixes w3c#755
padenot
reviewed
Oct 15, 2026
padenot
left a comment
Collaborator
There was a problem hiding this comment.
Some initial comments, I plan to look at this more, I think something is off when doing configure-reset-configure, with some decode in between those.
| 3. Decrement {{AudioDecoder/[[decodeQueueSize]]}} and run the | ||
| [=AudioDecoder/Schedule Dequeue Event=] algorithm. | ||
| 4. Enqueue the following steps to the {{AudioDecoder/[[codec work queue]]}}: | ||
| 4. Let |resetGeneration| be {{AudioDecoder/[[reset generation]]}}. |
Collaborator
There was a problem hiding this comment.
Shouldn't this happen when enqueuing? Otherwise the problem isn't really solved is it?
| 2. Remove |promise| from | ||
| algorithm with |decoded outputs| and |resetGeneration|. | ||
| 2. If {{AudioDecoder/[[reset generation]]}} is not equal to | ||
| |resetGeneration|, abort these steps. |
Collaborator
There was a problem hiding this comment.
I think we simply want to return here.
| Run these steps: | ||
| 1. For each |output| in |outputs|: | ||
| 1. Let |timestamp| and |duration| be the | ||
| 1. If {{VideoDecoder/[[reset generation]]}} is not equal to |
Collaborator
There was a problem hiding this comment.
This could use a note to explain why we seemingly check this twice (here and at the call site).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a [[reset generation]] internal slot to AudioDecoder, VideoDecoder, AudioEncoder, and VideoEncoder.
Increment it on reset and verify it before emitting each output and before resolving flush promises.
Fixes #755
Preview | Diff