diff options
author | Andreas Huber <andih@google.com> | 2009-09-11 12:58:53 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2009-09-11 12:58:53 -0700 |
commit | df4de7d7bd0060a84b064ce074d3f86d3a7aa0ae (patch) | |
tree | 20dacca53bcfba3ce8c46c72d8a67e2b78b6dccc | |
parent | 8f0e4aace6c0643f7c4005184c7df2c73368f0dc (diff) | |
download | frameworks_av-df4de7d7bd0060a84b064ce074d3f86d3a7aa0ae.zip frameworks_av-df4de7d7bd0060a84b064ce074d3f86d3a7aa0ae.tar.gz frameworks_av-df4de7d7bd0060a84b064ce074d3f86d3a7aa0ae.tar.bz2 |
Apparently I must not use OMX_UseBuffer on either input or output ports on any of the TI components... or else.
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a964d17..d905619 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -232,6 +232,16 @@ sp<OMXCodec> OMXCodec::Create( quirks |= kRequiresAllocateBufferOnOutputPorts; } + if (!strncmp(componentName, "OMX.TI.", 7)) { + // Apparently I must not use OMX_UseBuffer on either input or + // output ports on any of the TI components or quote: + // "(I) may have unexpected problem (sic) which can be timing related + // and hard to reproduce." + + quirks |= kRequiresAllocateBufferOnInputPorts; + quirks |= kRequiresAllocateBufferOnOutputPorts; + } + sp<OMXCodec> codec = new OMXCodec( omx, node, quirks, createEncoder, mime, componentName, source); @@ -840,8 +850,8 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) { mNode, portIndex, mem, &buffer); } else if (portIndex == kPortIndexOutput && (mQuirks & kRequiresAllocateBufferOnOutputPorts)) { - err = mOMX->allocate_buffer( - mNode, portIndex, def.nBufferSize, &buffer); + err = mOMX->allocate_buffer_with_backup( + mNode, portIndex, mem, &buffer); } else { err = mOMX->use_buffer(mNode, portIndex, mem, &buffer); } |