diff options
author | Chainfire <git@jongma.org> | 2014-10-28 11:20:16 +0100 |
---|---|---|
committer | Chainfire <git@jongma.org> | 2014-12-06 19:05:42 +0100 |
commit | 0f1255c4a61677f2885af8dd55b63b1379ba8663 (patch) | |
tree | 942bda19ebe148c9c83aca00955bbdb6c38a0f22 | |
parent | ecd5425ba5d96f5f3560d08799449ca8d789c618 (diff) |
fix playback getting progressively slower and memory filling up until crash
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.
-rw-r--r-- | xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp index 10c34a7e8e..a0818c027e 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp @@ -782,7 +782,7 @@ int CDVDVideoCodecAndroidMediaCodec::GetOutputPicture(void) { int rtn = 0; - int64_t timeout_us = 5000; + int64_t timeout_us = 50000; CJNIMediaCodecBufferInfo bufferInfo; int index = m_codec->dequeueOutputBuffer(bufferInfo, timeout_us); if (index >= 0) |