xbmc/xbmc — pull request #5891 by Chainfire (2014-12-06 11:04:46+00:00)
Title: fix playback getting progressively slower and memory filling up until cr...

...ash

The timeout in dequeueOutputBuffer has been increased to 50ms (from 5ms), to ensure a buffer will be available. While it appears this is not an issue on 4.4 and older, on Android 5.0 dequeueOutputBuffer with a 5ms timeout will usually fail, releaseOutputBuffer will not be called, and this will lead to most dequeueInputBuffer calls failing as well (far fewer than wanted fps calls will succeed). This in turn leads to the m_demux queue quickly filling up with the raw frame data, consuming all system memory, until a crash results.