Skip to content

Status error not cleared when playback resumed after output enabled #2454

@geneticdrift

Description

@geneticdrift

Bug report

Disable all outputs while playing, the status shows error: Failed to open audio output.

Then, enable an output and send the play command: playback resumes, but the status still has that error.

Expected Behavior

Error cleared when playback resumed after output was enabled.

Actual Behavior

Error not cleared.

Version

Music Player Daemon 0.25 (v0.24.9-208-gcb72bc5bd+)

The error should probably be cleared in playlist::PlayAny before the return from the if (playing) branch. (changed in f43d7de)

diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx
index 17ca93b44..1172c2e36 100644
--- a/src/queue/PlaylistControl.cxx
+++ b/src/queue/PlaylistControl.cxx
@@ -86,6 +86,8 @@ playlist::PlayAny(PlayerControl &pc)
    if (queue.IsEmpty())
        return;
 
+   pc.LockClearError();
+
    if (playing) {
        /* already playing: unpause playback, just in
           case it was paused, and return */
@@ -93,7 +95,6 @@ playlist::PlayAny(PlayerControl &pc)
        return;
    }
 
-   pc.LockClearError();
    stop_on_error = false;
    error_count = 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions