mirror of https://github.com/KDE/kasts.git
Fix the pause() method toggling pause state for VLC backend
This method should pause the audio. Instead, the VLC backend would toggle the pause state, i.e. it would start playing again if the audio stream was already paused. This caused issues with already paused streams incorrectly resuming playback after the system woke up from suspend. BUG: 474432
This commit is contained in:
parent
7f7901b2bd
commit
973a5b7ac9
|
@ -368,7 +368,12 @@ void VlcMediaBackend::pause()
|
|||
return;
|
||||
}
|
||||
|
||||
libvlc_media_player_pause(d->mPlayer);
|
||||
// need to check playback state first, because the pause function will
|
||||
// actually toggle pause, i.e. it will start playing when the current track
|
||||
// has already been paused
|
||||
if (playbackState() == KMediaSession::PlaybackState::PlayingState) {
|
||||
libvlc_media_player_pause(d->mPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
void VlcMediaBackend::stop()
|
||||
|
|
Loading…
Reference in New Issue