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

Commit 018b91ed authored by Wonsik Kim's avatar Wonsik Kim
Browse files

CCodec: don't trigger output format change after flush

Bug: 149751672
Test: atest CtsMediaTestCases:AdaptivePlaybackTest
Merged-In: If34bd5eba1498f081d613d2ebc15ff75f2a90f2f
Change-Id: If34bd5eba1498f081d613d2ebc15ff75f2a90f2f
parent eb0f8a11
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1331,8 +1331,6 @@ void CCodec::start() {
        mCallback->onError(err2, ACTION_CODE_FATAL);
        return;
    }
    // We're not starting after flush.
    (void)mSentConfigAfterResume.test_and_set();
    err2 = mChannel->start(inputFormat, outputFormat, buffersBoundToCodec);
    if (err2 != OK) {
        mCallback->onError(err2, ACTION_CODE_FATAL);
@@ -1580,7 +1578,6 @@ void CCodec::signalResume() {
        return;
    }

    mSentConfigAfterResume.clear();
    {
        Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);
        const std::unique_ptr<Config> &config = *configLocked;
@@ -1797,7 +1794,7 @@ void CCodec::onMessageReceived(const sp<AMessage> &msg) {
            // handle configuration changes in work done
            Mutexed<std::unique_ptr<Config>>::Locked configLocked(mConfig);
            const std::unique_ptr<Config> &config = *configLocked;
            bool changed = !mSentConfigAfterResume.test_and_set();
            bool changed = false;
            Config::Watcher<C2StreamInitDataInfo::output> initData =
                config->watch<C2StreamInitDataInfo::output>();
            if (!work->worklets.empty()
+0 −1
Original line number Diff line number Diff line
@@ -193,7 +193,6 @@ private:

    Mutexed<std::unique_ptr<CCodecConfig>> mConfig;
    Mutexed<std::list<std::unique_ptr<C2Work>>> mWorkDoneQueue;
    std::atomic_flag mSentConfigAfterResume;

    friend class CCodecCallbackImpl;