Commit 66365948 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Use a rounded value to compute the frames

parent 9138fc1d
......@@ -215,7 +215,7 @@ qint64 ClipRenderer::getCurrentFrame() const
{
if ( m_clipLoaded == false || m_isRendering == false || m_selectedMedia == NULL )
return 0;
return m_mediaPlayer->getPosition() * ( m_end - m_begin ) - m_begin;
return qRound64( (qreal)m_mediaPlayer->getTime() / 1000 * (qreal)m_selectedMedia->getFps() );
}
float ClipRenderer::getFps() const
......
......@@ -100,7 +100,7 @@ public:
*/
qint64 getLength() const
{
return getLengthMs() / 1000 * getFps();
return qRound64( (qreal)getLengthMs() / 1000 * (qreal)getFps() );
}
/**
......
Supports Markdown
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