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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user