From f89a87ab3708e75c406b2abcb7e69dc1b076868a Mon Sep 17 00:00:00 2001 From: Haynes Mathew George Date: Mon, 25 Jun 2012 21:27:56 -0700 Subject: Process EBD and FBD messages in ERROR state - OMXCodec::on_message() function drops all OMX messages if OMXCodec is in ERROR state - This can cause EBD/FBD messages containing valid buffers to be dropped - Avoid dropping EBD/FBD messages so that buffer book-keeping is still possible Change-Id: Idc1174b3fa946b26458d49394b87fba1738b228e Signed-off-by: Iliyan Malchev --- media/libstagefright/OMXCodec.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index b3e14da..8dbac72 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2050,8 +2050,14 @@ int64_t OMXCodec::getDecodingTimeUs() { void OMXCodec::on_message(const omx_message &msg) { if (mState == ERROR) { - ALOGW("Dropping OMX message - we're in ERROR state."); - return; + /* + * only drop EVENT messages, EBD and FBD are still + * processed for bookkeeping purposes + */ + if (msg.type == omx_message::EVENT) { + ALOGW("Dropping OMX EVENT message - we're in ERROR state."); + return; + } } switch (msg.type) { -- cgit v1.1