Commit 98a83487 authored by Committed by Thomas Daede
Fix ogg123 freeze when interrupting at End-Of-Stream.
Bug-Debian: https://bugs.debian.org/307325 Forwarded: https://trac.xiph.org/ticket/1956#comment:3 When arriving at the end of the input file, the main thread waits for the output thread to finish up the current buffer. If a cancellation signal arrives at that stage, this signal of an empty buffer never arrives because the output thread bails out before actually emptying the buffer. Fix: 1.) Make sure the output thread wakes up the main thread when bailing out, so the main thread can go on, too. 2.) When the main thread wakes up while waiting for an empty buffer, make sure it understands the situation (that there won't be an empty buffer because the replay has been cancelled) and doesn't go back to sleep.
Showing with 19 additions and 3 deletions