From d954d3b98d2a815859690d396c2a2d3fdeaf7240 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Feb 2011 17:17:44 +0100 Subject: [PATCH] Fixed video looping forever on some Phonon backends --- src/MediaView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MediaView.cpp b/src/MediaView.cpp index b98ee3c..29ec46d 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -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(); -- 2.39.5