mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-19 04:50:16 +01:00
Disable gstengine's timer when it's stopped.
This commit is contained in:
parent
a65c055b20
commit
3adc74dfab
@ -418,13 +418,15 @@ bool GstEngine::Play( uint offset ) {
|
||||
if (offset) Seek(offset);
|
||||
|
||||
current_sample_ = 0;
|
||||
startTimer(kTimerInterval);
|
||||
timer_id_ = startTimer(kTimerInterval);
|
||||
emit StateChanged(Engine::Playing);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GstEngine::Stop() {
|
||||
killTimer(timer_id_);
|
||||
|
||||
url_ = QUrl(); // To ensure we return Empty from state()
|
||||
|
||||
if (fadeout_enabled_ && current_pipeline_)
|
||||
|
@ -152,6 +152,8 @@ class GstEngine : public Engine::Base {
|
||||
QTimer* seek_timer_;
|
||||
bool waiting_to_seek_;
|
||||
uint seek_pos_;
|
||||
|
||||
int timer_id_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user