summaryrefslogtreecommitdiffstats
path: root/kaboodle
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-09 13:29:39 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-09 13:29:39 -0500
commitc0913ce69ba56f01e0b197f6c7a4776080da35a0 (patch)
treee15a785a8ee00f8d2c0c61fefd543cf1d82de45b /kaboodle
parent0ecfaa944652fa9b7a632e6135741c4b9f473a20 (diff)
downloadtdemultimedia-c0913ce69ba56f01e0b197f6c7a4776080da35a0.tar.gz
tdemultimedia-c0913ce69ba56f01e0b197f6c7a4776080da35a0.zip
Fix artsd exiting on Xine-generated Xorg errors
This relates to Bug 2150 Fix Kaboodle not playing newly loaded videos This relates to Bug 1905
Diffstat (limited to 'kaboodle')
-rw-r--r--kaboodle/engine.cpp26
-rw-r--r--kaboodle/player.cpp14
2 files changed, 23 insertions, 17 deletions
diff --git a/kaboodle/engine.cpp b/kaboodle/engine.cpp
index a53989d2..9008dab0 100644
--- a/kaboodle/engine.cpp
+++ b/kaboodle/engine.cpp
@@ -109,20 +109,18 @@ bool Kaboodle::Engine::reload(void)
void Kaboodle::Engine::play()
{
- if(d->playobj)
- {
- switch(d->playobj->state())
- {
- case Arts::posIdle:
- if(needReload)
- reload();
- d->playobj->play();
- break;
- case Arts::posPaused:
- d->playobj->play();
- break;
- default:
- break;
+ if(d->playobj) {
+ switch(d->playobj->state()) {
+ case Arts::posIdle:
+ if(needReload)
+ reload();
+ d->playobj->play();
+ break;
+ case Arts::posPaused:
+ d->playobj->play();
+ break;
+ default:
+ break;
}
}
}
diff --git a/kaboodle/player.cpp b/kaboodle/player.cpp
index af53a91b..4ec345c7 100644
--- a/kaboodle/player.cpp
+++ b/kaboodle/player.cpp
@@ -88,15 +88,17 @@ KMediaPlayer::View *Kaboodle::Player::view(void)
// notice how this is just an expanded stop() ? weird.
bool Kaboodle::Player::openURL(const KURL &f)
{
- if(!current.isEmpty())
+ bool previousLoad = !current.isEmpty();
+ if (previousLoad)
{
uncompleted = false;
engine->stop();
+ current = f;
}
emit started(0);
current = f;
- if(!engine->load(current))
+ if (!engine->load(current))
{
current = KURL();
setState(Empty);
@@ -104,12 +106,18 @@ bool Kaboodle::Player::openURL(const KURL &f)
return false;
}
+ if (previousLoad)
+ {
+ TQTimer::singleShot( 0, this, SLOT(play()) );
+ return true;
+ }
+
stopAction->setEnabled(false);
playAction->setEnabled(true);
pauseAction->setEnabled(false);
setState(Empty); // so stateChanged() is emitted and autoPlay works
setState(Stop);
-
+
tickerTimeout();
return true;
}