w3c / w3c/webcodecs

Clarify `reset()` behaviour when multiple things are being output

Open
#755 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CR Blocking
Dominant language
HTML
Stars
1.3k
Forks
194
Avg merge
1d 13h
Merged PRs (30d)
3

Description

See https://github.com/web-platform-tests/interop/issues/614

Let's say I have an encoder that has quite a long latency, e.g. 16 frames.

If we enqueue 15 frames for encoding, call flush() and in output callback, call reset() on the encoder after e.g. the 8th callback, what should happen?

Firefox outputs the 15 frames, the flush() succeeds, and then the encoder is reset, because there's no prose to check that the encoder has been reset in the algorithm that calls the callback. But the description of the reset() method says that callbacks are not to continue (paraphrasing).

The intent might have been to not call the callbacks after a reset, and we should make it explicit if that's the case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebCodecs reset() description and the flush() algorithm that invokes output callbacks, then compare the scenario with interop issue 614. Clarify whether callbacks already in progress must stop after reset(), and update the specification prose and algorithm so the expected behavior is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.