Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f89a87ab authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Iliyan Malchev
Browse files

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: default avatarIliyan Malchev <malchev@google.com>
parent f18da552
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2050,9 +2050,15 @@ int64_t OMXCodec::getDecodingTimeUs() {

void OMXCodec::on_message(const omx_message &msg) {
    if (mState == ERROR) {
        ALOGW("Dropping OMX message - we're in ERROR state.");
        /*
         * 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) {
        case omx_message::EVENT: