Closed Bug 1419668 Opened 7 years ago Closed 7 years ago

MemoryBlockCache::mMaxBlocks doesn't change as buffer size grows

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/797c93d81fe446f78babf20894f0729f15f71ee6/dom/media/MemoryBlockCache.cpp#156 Found this bug while debugging bug 1418430 by playing http://23.253.41.15/ff/. The initial content length is 1000000 and buffer size is grew as more data comes in. However, mMaxBlocks is not changed and some blocks will be evicted for exceeding the max number of blocks. This is not ideal. Since MemoryBlockCache is used only when the content length is smaller than MediaPrefs::MediaMemoryCacheMaxSize() * 1024, we should set mMaxBlocks according to the pref value.
Assignee: nobody → jwwang
Priority: -- → P3
Summary: MemoryBlockCache::mMaxBlocks should grow as buffer size grows → MemoryBlockCache::mMaxBlocks doesn't change as buffer size grows
Attachment #8931197 - Flags: review?(bechen)
Comment on attachment 8931197 [details] Bug 1419668 - set mMaxBlocks according to MediaPrefs::MediaMemoryCacheMaxSize(). https://reviewboard.mozilla.org/r/202292/#review207656
Attachment #8931197 - Flags: review?(bechen) → review+
Attachment #8931197 - Flags: review?(gsquelart)
Comment on attachment 8931197 [details] Bug 1419668 - set mMaxBlocks according to MediaPrefs::MediaMemoryCacheMaxSize(). https://reviewboard.mozilla.org/r/202292/#review207996 Makes sense, thank you.
Attachment #8931197 - Flags: review?(gsquelart) → review+
Thanks for the reviews!
Blocks: 1369263
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6724ad1ea301 set mMaxBlocks according to MediaPrefs::MediaMemoryCacheMaxSize(). r=bechen,gerald
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: