]> git.sur5r.net Git - minitube/commitdiff
Fixed video looping forever on some Phonon backends
authorunknown <flavio@.(none)>
Thu, 17 Feb 2011 16:17:44 +0000 (17:17 +0100)
committerunknown <flavio@.(none)>
Thu, 17 Feb 2011 16:17:44 +0000 (17:17 +0100)
src/MediaView.cpp

index b98ee3cdd1c626ba7f88b9d0d4cd98b711cae93f..29ec46d2cf49656c7e443a97a36f3ba3324f038d 100644 (file)
@@ -464,7 +464,9 @@ void MediaView::skip() {
 }
 
 void MediaView::playbackFinished() {
-    if (mediaObject->currentTime() < mediaObject->totalTime()) {
+    // qDebug() << "finished" << mediaObject->currentTime() << mediaObject->totalTime();
+    // add 10 secs for imprecise Phonon backends (VLC, Xine)
+    if (mediaObject->currentTime() + 10000 < mediaObject->totalTime()) {
         // mediaObject->seek(mediaObject->currentTime());
         QTimer::singleShot(3000, this, SLOT(playbackResume()));
     } else skip();