From 8d40fd2e0d7c264ce38c361fe7c9a20de9a81f0a Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 28 May 2014 16:40:12 +0200 Subject: slideshow: Don't assume anything about the duration. Let the player decide what to do when the duration is zero, and start()/stop() was called. Change-Id: I17027349e8d61f7b114e193a769402c04a64f3f3 --- slideshow/source/engine/shapes/viewmediashape.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'slideshow') diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index d5982379deb6..ce507174cb49 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -128,7 +128,7 @@ namespace slideshow if( !mxPlayer.is() ) implInitialize( maBounds ); - if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) ) + if (mxPlayer.is()) mxPlayer->start(); return true; @@ -170,7 +170,7 @@ namespace slideshow void ViewMediaShape::pauseMedia() { - if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) ) + if (mxPlayer.is()) mxPlayer->stop(); } @@ -178,7 +178,7 @@ namespace slideshow void ViewMediaShape::setMediaTime(double fTime) { - if( mxPlayer.is() && ( mxPlayer->getDuration() > 0.0 ) ) + if (mxPlayer.is()) mxPlayer->setMediaTime(fTime); } -- cgit