]> git.sur5r.net Git - minitube/commitdiff
Fix videos not playing due to too short buffering
authorFlavio <flavio@odisseo.local>
Thu, 14 Apr 2011 21:35:25 +0000 (23:35 +0200)
committerFlavio <flavio@odisseo.local>
Thu, 14 Apr 2011 21:35:25 +0000 (23:35 +0200)
src/MediaView.cpp

index ca4ff292bcf39a83eb6a9b0e86853846c5229abe..c9ae47f90b4ae4f2246ea55f4e31cfee6356831f 100644 (file)
@@ -124,7 +124,7 @@ MediaView::MediaView(QWidget *parent) : QWidget(parent) {
 #ifdef APP_DEMO
     demoTimer = new QTimer(this);
     demoTimer->setSingleShot(true);
-    demoTimer->setInterval(60000);
+    demoTimer->setInterval(30000);
     connect(demoTimer, SIGNAL(timeout()), SLOT(demoMessage()));
 #endif
 
@@ -196,6 +196,11 @@ void MediaView::disappear() {
 }
 
 void MediaView::handleError(QString message) {
+    if (message.indexOf("movie atom") != -1 || message.indexOf("Could not open") != -1) {
+        QTimer::singleShot(1000, this, SLOT(startPlaying()));
+        return;
+    }
+
     videoAreaWidget->showError(message);
     skippedVideo = listModel->activeVideo();
     // recover from errors by skipping to the next video