Disable gstengine's timer when it's stopped.

This commit is contained in:
John Maguire 2010-05-03 14:15:42 +00:00
parent a65c055b20
commit 3adc74dfab
2 changed files with 5 additions and 1 deletions

View File

@ -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_)

View File

@ -152,6 +152,8 @@ class GstEngine : public Engine::Base {
QTimer* seek_timer_;
bool waiting_to_seek_;
uint seek_pos_;
int timer_id_;
};