Closed Bug 493678 Opened 15 years ago Closed 15 years ago

Another infinite loop in oggplay_step_decoding

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: cajbir)

References

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

Attached video testcase (deleted) —
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.
Flags: blocking1.9.1+
Attached patch Fix (deleted) — Splinter Review
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.
Whiteboard: [needs landing]
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Depends on: 500311
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: