diff options
author | Sunita Nadampalli <sunitan@ti.com> | 2011-04-08 15:06:34 -0500 |
---|---|---|
committer | Jean Johnson <jean-johnson@ti.com> | 2011-04-12 01:39:56 -0500 |
commit | 9f69562143f0bb1a7510372f1b16d0f69aa76364 (patch) | |
tree | 372603c406dccc0039e6f76381ee630d0977d668 | |
parent | 6b90b887c5f464b83f8dfa18a48f67131febeff1 (diff) | |
download | base-9f69562143f0bb1a7510372f1b16d0f69aa76364.tar.gz |
OMXCodec fix for NPA mode thumbnail scenario
Description# The mNumberOfNPABuffersSent state variable
update is corrected in fillbufferdone callback.
Earlier we were decrementing the state variable in
FillbufferDone callback unconditionally.During port
reconfiguration scenarios we were resetting this variable
to "0" hence the further decrement in FillBufferDone callback
was wrapping around this unsigned state variable to large value.
This was resulting in no buffer sending to Ducati for thumbnail
generation, hence thumbnail generator was hanging forever.
This is fixed by decrementing the mNumberOfNPABuffersSent state
memeber only if it non-zero positive number.
DRT# OMAPS00236210 - No thumbnails generated for the clips which result
in port reconfiguration
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Patch Set 2: Simple cherry-pick on current head. Taking approvals,
verfication and build test from patch set 1.
Signed-off-by: Jean Johnson <jean-johnson@ti.com>
Change-Id: Ibaaca788497583ab7d0fadef5cc491c72dfb0486
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index a4642cf2ef7a..683fa371559b 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2964,7 +2964,8 @@ void OMXCodec::on_message(const omx_message &msg) { #if defined(OMAP_ENHANCEMENT) && defined(TARGET_OMAP4) && defined (NPA_BUFFERS) if( !strcmp(mComponentName, "OMX.TI.DUCATI1.VIDEO.DECODER") && (mQuirks & OMXCodec::kThumbnailMode) ){ - mNumberOfNPABuffersSent--; + if (mNumberOfNPABuffersSent > 0) + mNumberOfNPABuffersSent--; } #endif info->mOwnedByComponent = false; |