xbmc/xbmc — pull request #2653 by sraue (2013-04-24 19:54:08+00:00)
Title: [Frodo] Don't block waiting for EOS in audio/video players

Backport of https://github.com/xbmc/xbmc/commit/607cc54ab54a53a96999d0fab31fabde93f02c65

Currently we block in OMXPlayerAudio/OMXPlayerVideo from the point we see EOF from demuxer,
until the last frame/audio sample has been played out. This can be a few seconds.
It means no more messages (such as abort) can be received during this period.
This results in a bug where if you press stop after the demuxer EOF has occurred it takes
a long time to stop. You would expect this to be the few seconds of queued data,
but it actually turns out to be 30 seconds, as the clocks get stopped by the stop message,
but the players never find out and we hit a timeout.
It also stops seek/pause working during the playout period.
It also stops (graphical) subtitles from being rendered during this time.
The fix involves not blocking for the EOS, but allowing the polling from OMXPlayer to catch it.