Closed Bug 1108917 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: Audio/Video, defect)

29 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox36 --- fixed
firefox37 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

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+
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.