Closed
Bug 814308
Opened 12 years ago
Closed 11 years ago
MediaDecoder::SetDuration doesn't handle aDuration=inf correctly
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: kinetik, Assigned: padenot)
Details
Attachments
(1 file)
1.69 KB,
patch
|
kinetik
:
review+
|
Details | Diff | Splinter Review |
For example, if a clone is created via InitializeDecoderAsClone, MediaDecoder::GetDuration() may return inf, a double >= 0, or NaN. This value is then passed to the clone's MediaDecoder::SetDuration, which assumes aDuration is >= 0 and static casts the value to int64_t.
Assignee | ||
Comment 1•12 years ago
|
||
I used |mfbt/FloatingPoint.h| header because |std::isnan| and familly is apparently not available on Windows.
Attachment #695801 -
Flags: review?(kinetik)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → paul
Reporter | ||
Comment 2•12 years ago
|
||
Comment on attachment 695801 [details] [diff] [review] MediaDecoder::SetDuration doesn't handle aDuration=inf correctly. r= + } else if (MOZ_DOUBLE_IS_NaN(aDuration)) { + mDuration = -1; Do we need to SetInfinite(true) here, too? MetadataLoaded treats a duration of -1 from the state machine as infinite.
Attachment #695801 -
Flags: review?(kinetik) → review+
Assignee | ||
Comment 3•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/23456fc21052
Comment 4•11 years ago
|
||
Push backed out for Windows pgo-only mochitest-1 timeouts in media tests, since the backout of just 1abf4c88f8f1 didn't work (see bug 793274 comment 12 for example logs): https://hg.mozilla.org/integration/mozilla-inbound/rev/f2912b7e727a
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea7f8d86e592 I bisected the queue on try, this patch is safe.
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ea7f8d86e592
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•