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

Commit ec5f7cc4 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

MediaCodec: move to UNINITIALIZED state on codec error

ACodec moves to Uninitialized state after receiving codec error.
Make MediaCodec also move to the same state, so stop() and
release() will work correctly.

Bug: 13675112
Change-Id: I1c7e8b274f68345fc0e6a55c70dff6c7a4fb2e72
parent 5e184b0d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -603,6 +603,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {
                            postActivityNotificationIfPossible();
                            postActivityNotificationIfPossible();


                            cancelPendingDequeueOperations();
                            cancelPendingDequeueOperations();
                            setState(UNINITIALIZED);
                            break;
                            break;
                        }
                        }


@@ -612,6 +613,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {


                            mFlags |= kFlagStickyError;
                            mFlags |= kFlagStickyError;
                            postActivityNotificationIfPossible();
                            postActivityNotificationIfPossible();
                            setState(UNINITIALIZED);
                            break;
                            break;
                        }
                        }
                    }
                    }