diff options
author | Andreas Huber <andih@google.com> | 2009-10-08 08:41:11 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-10-08 08:41:11 -0700 |
commit | fcf6723f0974854a04bd0d9e676b5ed2a147ce09 (patch) | |
tree | 8fc46d53244055ec48d75fdc12cd35740ced58b4 /media/libstagefright/omx | |
parent | ec430b158df17b2c766f7750a96c35d3902f5f49 (diff) | |
download | frameworks_av-fcf6723f0974854a04bd0d9e676b5ed2a147ce09.zip frameworks_av-fcf6723f0974854a04bd0d9e676b5ed2a147ce09.tar.gz frameworks_av-fcf6723f0974854a04bd0d9e676b5ed2a147ce09.tar.bz2 |
Insert a small delay after submitting to surface flinger and before returning the buffer to the decoder.
Since we cannot tell how long it'll take until surface flinger
has displayed the data onscreen, we'll just have to guess...
We must not return the buffer to the decoder before it's been displayed.
Diffstat (limited to 'media/libstagefright/omx')
-rw-r--r-- | media/libstagefright/omx/QComHardwareRenderer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/media/libstagefright/omx/QComHardwareRenderer.cpp b/media/libstagefright/omx/QComHardwareRenderer.cpp index e9930be..7dc368f 100644 --- a/media/libstagefright/omx/QComHardwareRenderer.cpp +++ b/media/libstagefright/omx/QComHardwareRenderer.cpp @@ -83,6 +83,11 @@ void QComHardwareRenderer::render( } mISurface->postBuffer(offset); + + // Since we cannot tell how long it'll take until surface flinger + // has displayed the data onscreen, we'll just have to guess... + // We must not return the buffer to the decoder before it's been displayed. + usleep(25000); } bool QComHardwareRenderer::getOffset(void *platformPrivate, size_t *offset) { |