2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Allow setSpeed() on non-active streaming player.

This commit is contained in:
John Preston
2020-02-06 13:27:21 +04:00
parent 6cf9157fb5
commit 1f16d72667

View File

@@ -827,7 +827,6 @@ float64 Player::speed() const {
}
void Player::setSpeed(float64 speed) {
Expects(active());
Expects(speed >= 0.5 && speed <= 2.);
if (!Media::Audio::SupportsSpeedControl()) {
@@ -835,11 +834,13 @@ void Player::setSpeed(float64 speed) {
}
if (_options.speed != speed) {
_options.speed = speed;
if (_audio) {
_audio->setSpeed(speed);
}
if (_video) {
_video->setSpeed(speed);
if (active()) {
if (_audio) {
_audio->setSpeed(speed);
}
if (_video) {
_video->setSpeed(speed);
}
}
}
}