Commit f59033da authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Enforce 29.97 fps when using a clip with 29.94 or 29.96 fps.

Related to #1273
parent 96c4dc5f
......@@ -1438,17 +1438,17 @@ void KdenliveDoc::switchProfile(ProfileParam* pf)
} else {
// Check for 23.98, 29.97, 59.94
if (qFuzzyCompare(fps_int, 23.0)) {
if (qFuzzyCompare(fps, 23.98)) {
if (qFuzzyCompare(fps, 23.98) || fps_frac > 0.94) {
profile->m_frame_rate_num = 24000;
profile->m_frame_rate_den = 1001;
}
} else if (qFuzzyCompare(fps_int, 29.0)) {
if (qFuzzyCompare(fps, 29.97)) {
if (qFuzzyCompare(fps, 29.97) || fps_frac > 0.94) {
profile->m_frame_rate_num = 30000;
profile->m_frame_rate_den = 1001;
}
} else if (qFuzzyCompare(fps_int, 59.0)) {
if (qFuzzyCompare(fps, 59.94)) {
if (qFuzzyCompare(fps, 59.94) || fps_frac > 0.9) {
profile->m_frame_rate_num = 60000;
profile->m_frame_rate_den = 1001;
}
......
......@@ -56,7 +56,7 @@ const QString ProfileInfo::descriptiveString() const
if (frame_rate_num() % frame_rate_den() == 0) {
fps_str = QString::number(frame_rate_num() / frame_rate_den());
} else {
fps_str = QString::number(frame_rate_num() / frame_rate_den(), 'f', 2);
fps_str = QString::number(double(frame_rate_num()) / frame_rate_den(), 'f', 2);
}
data.append(QStringLiteral("(%1x%2, %3fps)").arg(width()).arg(height()).arg(fps_str));
return data;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment