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

Commit 6a3eb80e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Invalidate compressed tracks when secondary outputs are changed."

parents 32af12c9 64794374
Loading
Loading
Loading
Loading
+13 −7
Original line number Diff line number Diff line
@@ -5749,6 +5749,11 @@ void AudioPolicyManager::checkSecondaryOutputs() {
                    client->getSecondaryOutputs().begin(),
                    client->getSecondaryOutputs().end(),
                    secondaryDescs.begin(), secondaryDescs.end())) {
                if (!audio_is_linear_pcm(client->config().format)) {
                    // If the format is not PCM, the tracks should be invalidated to get correct
                    // behavior when the secondary output is changed.
                    streamsToInvalidate.insert(client->stream());
                } else {
                    std::vector<wp<SwAudioOutputDescriptor>> weakSecondaryDescs;
                    std::vector<audio_io_handle_t> secondaryOutputIds;
                    for (const auto &secondaryDesc: secondaryDescs) {
@@ -5760,6 +5765,7 @@ void AudioPolicyManager::checkSecondaryOutputs() {
                }
            }
        }
    }
    if (!trackSecondaryOutputs.empty()) {
        mpClientInterface->updateSecondaryOutputs(trackSecondaryOutputs);
    }