Closed
Bug 569187
Opened 14 years ago
Closed 14 years ago
mAudioEndTime used before it's initialized (buffering logic decodes thousands of audio packets)
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: kinetik, Assigned: kinetik)
Details
Attachments
(1 file)
2.02 KB,
patch
|
cajbir
:
review+
|
Details | Diff | Splinter Review |
I can reproduce this by opening a largish non-autoplay video and then immediately seeking to the middle. We can get in a situation where the AudioLoop is waiting at http://mxr.mozilla.org/mozilla-central/source/content/media/nsBuiltinDecoderStateMachine.cpp#341 with: (gdb) p mState $20 = nsDecoderStateMachine::DECODER_STATE_DECODING (gdb) p mStopDecodeThreads $21 = 0 '\0' (gdb) p IsPlaying() $22 = 0 (gdb) p mReader.mRawPtr->mAudioQueue.GetSize() $23 = 33273 (gdb) p mReader.mRawPtr->mAudioQueue.AtEndOfStream() $24 = 0 In DecodeLoop(), we're constantly decoding audio to try to meet the targets, but: 227 audioDecoded = mReader->mAudioQueue.Duration() + 228 mAudioEndTime - currentTime; (gdb) p mReader.mRawPtr->mAudioQueue.Duration() $25 = 709802 (gdb) p mAudioEndTime $26 = -1 (gdb) p currentTime $27 = 1254821 (gdb) p audioDecoded $28 = -545020
Assignee | ||
Comment 1•14 years ago
|
||
Don't use mAudioEndTime in calculations if it's still -1. -1 is a sentinel value that indicates we haven't written any audio to the backend since initialization.
Updated•14 years ago
|
Attachment #448647 -
Flags: review?(chris.double) → review+
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 2•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/fa1972c19a0b
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in
before you can comment on or make changes to this bug.
Description
•