Skip to content

Commit b427227

Browse files
committed
fix: fix panic pausing unstarted stream
1 parent 4f9b050 commit b427227

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎player/src/audio.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ impl AudioThread {
325325
AudioCommand::Pause(paused) => {
326326
self.paused = paused;
327327
if paused {
328-
self.p.pause();
328+
if self.p.is_started() {
329+
self.p.pause();
330+
}
329331
} else {
330332
self.wants_play = true;
331333
}

0 commit comments

Comments
 (0)