nsOggReader preroll support

RESOLVED FIXED in mozilla15

Status

()

Core
Audio/Video
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rillian, Assigned: derf)

Tracking

Trunk
mozilla15
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The Opus decoder requires some time to converge after a seek. The spec recommends players start decoding 80 ms (3840 samples at 48 kHz) before the intended seek target and discard that initial output.

This is generally referred to as 'preroll'. It makes the most sense to handle this in nsOggReader (or nsBuiltinDecoder) where seeking is implemented. In particular, the preroll target must be clipped against the start of the stream, the time origen, or even buffered ranges, and the Reader is what's keeping track of where the decoder is in the stream.

This bug is about extending the seek logic in nsOggReader to start the decoder 80 ms ahead of the seek target. The existing logic in nsBuiltinDecoderReader::DecodeToTarget will then discard the extra samples up to the real seek point.
(Assignee)

Updated

5 years ago
Depends on: 759490
(Assignee)

Comment 1

5 years ago
Created attachment 628098 [details] [diff] [review]
Handle preroll correctly during an Opus seek
Assignee: nobody → tterribe
Status: NEW → ASSIGNED
Attachment #628098 - Flags: review?(chris.double)
(Assignee)

Updated

5 years ago
Blocks: 759612
(Assignee)

Updated

5 years ago
Depends on: 674225

Updated

5 years ago
Attachment #628098 - Flags: review?(chris.double) → review+
(Assignee)

Comment 2

5 years ago
Greenish on try: https://tbpl.mozilla.org/?tree=Try&rev=351135ba6c51
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8b7fca9d4bb
Target Milestone: --- → mozilla15

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/a8b7fca9d4bb
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.