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

Commit a10965dd authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Linux Build Service Account
Browse files

Nuplayer: Ensure AudioSink is closed before clearing Renderer

Close AudioSink object explicitly before clearing NuPlayerRenderer
to avoid race conditions between NuPlayerRenderer and AudioSink callback
thread.

CRs-Fixed: 927545
Change-Id: Id6cef83bc8e4b6f581641b19b0bbd29eee3704bb
parent 70fb1013
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1189,6 +1189,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                        FLUSH_CMD_SHUTDOWN /* audio */,
                        FLUSH_CMD_SHUTDOWN /* video */));

            mDeferredActions.push_back(
                    new SimpleAction(&NuPlayer::closeAudioSink));

            mDeferredActions.push_back(
                    new SimpleAction(&NuPlayer::performReset));