Created attachment 378239 [details] testcase 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.
Created attachment 378281 [details] [diff] [review] Fix 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.
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.
9 years ago
http://hg.mozilla.org/mozilla-central/rev/c3bf078aded1 We should check in the testcase.