Closed Bug 493678 Opened 11 years ago Closed 11 years ago
Another infinite loop in oggplay
Try loading the attached testcase. It never finished playing because the step-decode thread gets into an infinite loop in oggplay_step_decoding.
Infinite loops in the decoder are incredibly bad. They just make the browser silently and inexplicably slower until the user restarts.
liboggplay keeps a count of the number of active tracks in the main oggplay datastructure. Decoders start out intialized as active but the active track count starts at 0. In this example the theora track hits end of stream before our code goes through and marks tracks as active. So the active count goes from zero to -1. We then bump it up to 1 (adding the two tracks we make active). The theora track, since it has just been made active again, notices it's at end of stream and decrements to zero. Then the vorbis track drops it to -1. The code to break out of the step_decode loop when all tracks are inactive (active count is zero) never fires. Fix by making decoders inactive to start.
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
Checking to get Viktor's comments before needing landing.
Raised trac ticket 477 for this: https://trac.annodex.net/ticket/477 Discussed with Viktor last night and should be ok to land.
11 years ago
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/c3bf078aded1 We should check in the testcase.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Whiteboard: [needs 191 landing]
You need to log in before you can comment on or make changes to this bug.