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

Commit 1a3181d3 authored by Dichen Zhang's avatar Dichen Zhang Committed by Gerrit Code Review
Browse files

Merge "stagefright: Clear RenderQueue on port settings changed"

parents ecab82de 184cdb36
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7922,6 +7922,10 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent(
                            OMX_CommandPortEnable, kPortIndexOutput);
                }

                // Clear the RenderQueue in which queued GraphicBuffers hold the
                // actual buffer references in order to free them early.
                mCodec->mRenderTracker.clear(systemTime(CLOCK_MONOTONIC));

                if (err == OK) {
                    err = mCodec->allocateBuffersOnPort(kPortIndexOutput);
                    ALOGE_IF(err != OK, "Failed to allocate output port buffers after port "