Allow eviction of entire decoders that are ahead of the current play position

RESOLVED FIXED in Firefox 36



4 years ago
4 years ago


(Reporter: mattwoodrow, Assigned: mattwoodrow)


(Blocks 1 bug)

29 Branch

Firefox Tracking Flags

(firefox36 fixed, firefox37 fixed)



(2 attachments)

Currently we only allow eviction of data that is behind the current play position.

It's possible to accumulate considerable amounts of data ahead of the current position (usually by seeking backwards in small increments), which won't be evicted by the current code.

Seeking backwards will results in new decoders for each seek, so we can evict entire decoders and prevent this from using excessive amounts of memory.
We prefer to evict data as far away from the current playback position as possible, and this will help with that (in some cases).
Attachment #8533510 - Flags: review?(ajones)
Attachment #8533511 - Flags: review?(ajones)
Comment on attachment 8533510 [details] [diff] [review]
Part 1: Attempt to evict data from decoders in start-time order

Review of attachment 8533510 [details] [diff] [review]:

::: dom/media/mediasource/TrackBuffer.cpp
@@ +239,5 @@
> +        decoders[i] != mCurrentDecoder) {
> +      RemoveDecoder(decoders[i]);
> +    }
> +    if (toEvict <= 0 ||
> +        decoders[i] == mCurrentDecoder) {

nit: line break
Attachment #8533510 - Flags: review?(ajones) → review+
Attachment #8533511 - Flags: review?(ajones) → review+
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Flags: needinfo?(matt.woodrow)
Comment on attachment 8533511 [details] [diff] [review]
Part 2: Allow eviction of decoders that are ahead of the current playback position

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Less consistent testing, sites more likely to serve Flash video.
[Describe test coverage new/current, TBPL]: Landed on m-c.
[Risks and why]: Low, MSE-specific code.
[String/UUID change made/needed]: None.
Attachment #8533511 - Flags: approval-mozilla-aurora?
Comment on attachment 8533510 [details] [diff] [review]
Part 1: Attempt to evict data from decoders in start-time order

Same request applies to all patches on this bug.
Attachment #8533510 - Flags: approval-mozilla-aurora?
Attachment #8533510 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8533511 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.