Closed
Bug 1174584
Opened 11 years ago
Closed 11 years ago
Trackbuffer coded frame removal may leave content in unplayable state.
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla41
| Tracking | Status | |
|---|---|---|
| firefox41 | --- | fixed |
People
(Reporter: jya, Assigned: jya)
References
Details
Attachments
(3 files, 4 obsolete files)
|
2.01 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
|
3.71 KB,
patch
|
mozbugz
:
review+
|
Details | Diff | Splinter Review |
|
2.33 KB,
patch
|
mozbugz
:
review+
|
Details | Diff | Splinter Review |
When calling sourcebuffer.remove() it may leave the trackbuffers in invalid state.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jyavenard
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8622195 -
Flags: review?(cpearce)
| Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8622196 -
Flags: review?(cpearce)
| Assignee | ||
Comment 4•11 years ago
|
||
In the new MSE architecture. eviction is done asynchronously, also being super accurate, eviction will
always succeed.
Limit our eviction rate to be a minimum of 512kB.
Attachment #8622197 -
Flags: review?(cpearce)
| Assignee | ||
Updated•11 years ago
|
Attachment #8622194 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•11 years ago
|
||
Prevent reparsing the entire stream in the next call to appendBuffer.
Attachment #8622276 -
Flags: review?(cpearce)
| Assignee | ||
Comment 8•11 years ago
|
||
Comment on attachment 8622274 [details] [diff] [review]
P2. Properly handle removal of data within the current coded frame group.
wrong bug #
Attachment #8622274 -
Attachment is obsolete: true
Attachment #8622274 -
Flags: review?(cpearce)
| Assignee | ||
Updated•11 years ago
|
Attachment #8622276 -
Attachment is obsolete: true
Attachment #8622276 -
Flags: review?(cpearce)
| Assignee | ||
Updated•11 years ago
|
Attachment #8622277 -
Attachment is obsolete: true
Attachment #8622277 -
Flags: review?(cpearce)
Comment 9•11 years ago
|
||
Comment on attachment 8622196 [details] [diff] [review]
P2. Fix frames removal.
Review of attachment 8622196 [details] [diff] [review]:
-----------------------------------------------------------------
Passing review to Alfredo. Thanks for taking on this responsibility Alfredo!
Attachment #8622196 -
Flags: review?(cpearce) → review?(ayang)
Comment 10•11 years ago
|
||
Comment on attachment 8622197 [details] [diff] [review]
P3. Do not error in prepare append if we've reached our memory threshold.
Review of attachment 8622197 [details] [diff] [review]:
-----------------------------------------------------------------
Passing review to Alfredo. Thanks for taking on this responsibility Alfredo!
Attachment #8622197 -
Flags: review?(cpearce) → review?(ayang)
Updated•11 years ago
|
Attachment #8622195 -
Flags: review?(cpearce) → review+
Comment 11•11 years ago
|
||
Comment on attachment 8622196 [details] [diff] [review]
P2. Fix frames removal.
Thank you for help, Gerald.
Attachment #8622196 -
Flags: review?(ayang) → review?(gsquelart)
Comment 12•11 years ago
|
||
Comment on attachment 8622197 [details] [diff] [review]
P3. Do not error in prepare append if we've reached our memory threshold.
Thank you for help, Gerald.
Attachment #8622197 -
Flags: review?(ayang) → review?(gsquelart)
Comment on attachment 8622196 [details] [diff] [review]
P2. Fix frames removal.
Review of attachment 8622196 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with potential signed/unsigned issue fixed (or proved non-existent).
::: dom/media/mediasource/TrackBuffersManager.cpp
@@ +470,1 @@
> firstRemovedIndex = i;
Implicit conversion from uint32 to int32, probably ok here; but doesn't it produce a warning? You should do a static_cast.
Alternatively, make firstRemovedIndex a uint32 and use a special value (e.g., the traditional max 32-bit value) as 'not-assigned-yet' marker.
@@ +481,5 @@
> }
> // 4. Remove decoding dependencies of the coded frames removed in the previous step:
> // Remove all coded frames between the coded frames removed in the previous step and the next random access point after those removed frames.
> if (firstRemovedIndex >= 0) {
> + uint32_t start = firstRemovedIndex;
Implicit conversion from int32 to uint32, probably ok here as firstRemovedIndex >= 0; but doesn't it produce a warning? You should do a static_cast.
Alternatively, if you've made firstRemovedIndex a uint32, you don't even need 'start' anymore.
Attachment #8622196 -
Flags: review?(gsquelart) → review+
| Assignee | ||
Comment 14•11 years ago
|
||
the maximum size possible in a nsTArray is INT32_MAX.
I use a negative value to indicate that no frames were removed from the array. could change that with a Maybe I guess.
Attachment #8622197 -
Flags: review?(gsquelart) → review+
(In reply to Jean-Yves Avenard [:jya] from comment #14)
> the maximum size possible in a nsTArray is INT32_MAX.
> I use a negative value to indicate that no frames were removed from the
> array. could change that with a Maybe I guess.
If the maximum size is INT32_MAX, then you could use any higher value as 'no-frames-removed', e.g. UINT32_MAX. ;-)
Or use Maybe.
Or as first suggested, add static_cast's to avoid warnings (if any).
| Assignee | ||
Comment 16•11 years ago
|
||
but but but... what if we do have INT32_MAX frames in our array ???
Then UINT32_MAX is still bigger, so it's fine.
Comment 18•11 years ago
|
||
Comment 19•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e62a1881bf6b
https://hg.mozilla.org/mozilla-central/rev/128206149d80
https://hg.mozilla.org/mozilla-central/rev/06868346ce62
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•