Skip to content

Commit

Permalink
use round instead of ceil to get frame number from timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
YomikoR committed Apr 12, 2024
1 parent 5020d68 commit aa0c02c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ r19-mod-6.6
-Add an asterisk in preview window title that indicates change in text editor.
-Add info texts to certain reserved frame props when displayed.
-Improve error handling of the previewer.
-Better sync output frame numbers by timestamp.

r19-mod-6.5
-Use same vapoursynth library as used for script evaluation for plugin list.
Expand Down
2 changes: 1 addition & 1 deletion vsedit/src/preview/preview_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3154,7 +3154,7 @@ int PreviewDialog::timestampToFrame(qlonglong a_timestamp)
{
if(m_fpsDen == 0 || m_fpsNum == 0)
return 0;
return std::ceil((double)a_timestamp * m_fpsNum / m_fpsDen / 1000);
return std::round((double)a_timestamp * m_fpsNum / m_fpsDen / 1000);
}

void PreviewDialog::setExpectedFrame(int a_frame)
Expand Down

0 comments on commit aa0c02c

Please sign in to comment.