From: Vincent P. <vin...@la...> - 2014-08-23 20:51:16
|
Git commit 900d0c49de774fc25a7ea70d9ac74f1783a0acbb by Vincent PINON, on behalf of Steve Guilford. Committed on 23/08/2014 at 15:45. Pushed by vpinon into branch 'master'. fix importing a 50fps project into a 25fps - take 3 M +3 -9 src/project/projectitem.cpp http://commits.kde.org/kdenlive/900d0c49de774fc25a7ea70d9ac74f1783a0acbb diff --git a/src/project/projectitem.cpp b/src/project/projectitem.cpp index 980b898..1a0da3f 100644 --- a/src/project/projectitem.cpp +++ b/src/project/projectitem.cpp @@ -229,15 +229,9 @@ 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; - 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); - } + 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); } else { // No duration known, use an arbitrary one until it is. } |