Closed Bug 507028 Opened 17 years ago Closed 15 years ago

Infinite loop when playing completely decoded media

Categories

(Core :: Audio/Video, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: cpearce, Assigned: cpearce)

Details

Attachments

(1 file)

Attached file testcase
If we've completely decoded an ogg file, the nsOggDecodeStateMachine goes into DECODER_STATE_COMPLETED. In nsOggDecodeStateMachine::Run, the case that handles COMPLETED has a loop: // Play the remaining frames in the frame queue while (mState == DECODER_STATE_COMPLETED && !mDecodedFrames.IsEmpty()) { PlayFrame(); // ... } That's wrong, as PlayFrame() won't play if we're not playing, so it won't pop a frame off mDecodedFrames, and we won't exit the loop. This results in the throbber not stopping. STR: Seek to HTMLMediaElement.duration, you'll get a perpetual throbber.
That loop should be: // Play the remaining frames in the frame queue while (mState == DECODER_STATE_COMPLETED && mPlaying && !mDecodedFrames.IsEmpty()) { PlayFrame(); // ... } The testcase should not have the throbbers. This bug prevents seeked events from firing, maybe that's a cause of intermittent test failures?
Assignee: nobody → chris
Status: NEW → ASSIGNED
I just started running into this, but something causes the decoder to break out of the loop after 5 seconds or so (decoder shutdown externally?).
This is probably fixed by the new media backend.
(In reply to comment #3) > This is probably fixed by the new media backend. Looks fixed to me.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: