Skip to content

Commit

Permalink
fix custom video mode with integer fps
Browse files Browse the repository at this point in the history
It was creating a MLT profile with very large values in the
frame_rate_num and frame_rate_den.

https://forum.shotcut.org/t/beta-version-24-08-now-available-to-test/
45307/38
  • Loading branch information
ddennedy committed Aug 20, 2024
1 parent faf9be0 commit 663feca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,9 @@ void Util::normalizeFrameRate(double fps, int &numerator, int &denominator)
// Workaround storing QDoubleSpinBox::value() loses precision.
numerator = qRound(fps * 1000000.0);
denominator = 1000000;
auto gcd = greatestCommonDivisor(numerator, denominator);
numerator /= gcd;
denominator /= gcd;
}
}

Expand Down

0 comments on commit 663feca

Please sign in to comment.