]> git.sesse.net Git - kdenlive/blobdiff - src/projectitem.cpp
Fix some avformat producer concurrency crashes
[kdenlive] / src / projectitem.cpp
index 4f6ab88a7e14d68ed2d41135e2f7e575dbdd6dc2..d0b9999ec99b11dbc1fd9cdf2803d3d4535d8e68 100644 (file)
@@ -253,9 +253,10 @@ void ProjectItem::setProperties(const QMap < QString, QString > &attributes, con
     }
 }
 
-void ProjectItem::setProxyStatus(PROXYSTATUS status)
+void ProjectItem::setProxyStatus(PROXYSTATUS status, int progress)
 {
-    setData(0, ProxyRole, status);
+    if (progress > 0) setData(0, ProxyRole, progress);
+    else setData(0, ProxyRole, status);
 }
 
 bool ProjectItem::hasProxy() const
@@ -272,8 +273,8 @@ bool ProjectItem::isProxyReady() const
 
 bool ProjectItem::isProxyRunning() const
 {
-    PROXYSTATUS s = (PROXYSTATUS) data(0, ProxyRole).toInt();
-    if (s == PROXYWAITING || s == CREATINGPROXY) return true;
+    int s = data(0, ProxyRole).toInt();
+    if (s == PROXYWAITING || s == CREATINGPROXY || s > 0) return true;
     return false;
 }