[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdenlive] src/project: Revert "fix importing a 50fps project into a 25fps - take 3"
From:       Vincent PINON <vincent.pinon () laposte ! net>
Date:       2014-08-31 19:29:21
Message-ID: E1XOAoT-00011H-Gx () scm ! kde ! org
[Download RAW message or body]

Git commit 5305556bfd21ad3de97485bfa62a80dfe34cf579 by Vincent PINON.
Committed on 31/08/2014 at 19:17.
Pushed by vpinon into branch 'master'.

Revert "fix importing a 50fps project into a 25fps - take 3"

This reverts commit 900d0c49de774fc25a7ea70d9ac74f1783a0acbb.

M  +9    -3    src/project/projectitem.cpp

http://commits.kde.org/kdenlive/5305556bfd21ad3de97485bfa62a80dfe34cf579

diff --git a/src/project/projectitem.cpp b/src/project/projectitem.cpp
index 1a0da3f..980b898 100644
--- a/src/project/projectitem.cpp
+++ b/src/project/projectitem.cpp
@@ -229,9 +229,15 @@ void ProjectItem::setProperties(const QMap < QString, QString > \
                &attributes, con
         if (itemdata.contains('/')) itemdata = itemdata.section('/', 0, 0) + "/ ";
         else itemdata.clear();
         if (prefix.isEmpty()) prefix = itemdata;
-        GenTime duration = GenTime(attributes.value("duration").toInt(), \
                attributes.value("fps").toDouble());
-        setData(0, DurationRole, prefix + Timecode::getEasyTimecode(duration, \
                attributes.value("fps").toDouble()));
-        m_clip->setDuration(duration);
+        if (attributes.contains("fps") && attributes.value("fps").toInt() >= 1) {
+            GenTime duration = GenTime(attributes.value("duration").toInt(), \
attributes.value("fps").toInt()); +            setData(0, DurationRole, prefix + \
Timecode::getEasyTimecode(duration, attributes.value("fps").toInt())); +            \
m_clip->setDuration(duration); +        } else {
+            GenTime duration = GenTime(attributes.value("duration").toInt(), \
KdenliveSettings::project_fps()); +            setData(0, DurationRole, prefix + \
Timecode::getEasyTimecode(duration, KdenliveSettings::project_fps())); +            \
m_clip->setDuration(duration); +        }
     } else  {
         // No duration known, use an arbitrary one until it is.
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic