Skip to content

Commit

Permalink
Fix seeking past 595 hours. Fixes #997
Browse files Browse the repository at this point in the history
  • Loading branch information
smplayer-dev committed Jun 23, 2024
1 parent 4d2edc7 commit 2df9c31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1499,10 +1499,9 @@ void Core::goToPosition(int value) {

if (pref->relative_seeking) {
goToPos( (double) value / (SEEKBAR_RESOLUTION / 100) );
}
else {
} else {
if (mdat.duration > 0) {
int jump_time = (int) mdat.duration * value / SEEKBAR_RESOLUTION;
int jump_time = (double) mdat.duration * value / SEEKBAR_RESOLUTION;
goToSec(jump_time);
}
}
Expand Down Expand Up @@ -3836,7 +3835,7 @@ void Core::changeCurrentSec(double sec) {
if ( (mdat.duration > 1) && (mset.current_sec > 1) &&
(mdat.duration > mset.current_sec) )
{
value = ( (int) mset.current_sec * SEEKBAR_RESOLUTION) / (int) mdat.duration;
value = ( (double) mset.current_sec * SEEKBAR_RESOLUTION) / (int) mdat.duration;
}
emit positionChanged(value);
#else
Expand Down

0 comments on commit 2df9c31

Please sign in to comment.