Skip to content

Commit

Permalink
VideoView: Fix slider do not update after relative seek to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jan 11, 2024
1 parent f9bf4ef commit 07dba46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wiliwili/source/view/video_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,21 +541,21 @@ void VideoView::requestSeeking(int seek, int delay) {
brls::cancelDelay(seeking_iter);
if (delay <= 0) {
this->hideCenterHint();
if (seek == 0) return;
mpvCore->seekRelative(seek);
seeking_range = 0;
is_seeking = false;
if (seek == 0) return;
mpvCore->seekRelative(seek);
} else {
// 延迟触发跳转进度
is_seeking = true;
ASYNC_RETAIN
seeking_iter = brls::delay(delay, [ASYNC_TOKEN, seek]() {
ASYNC_RELEASE
this->hideCenterHint();
if (seek == 0) return;
mpvCore->seekRelative(seek);
seeking_range = 0;
is_seeking = false;
if (seek == 0) return;
mpvCore->seekRelative(seek);
});
}
}
Expand Down

0 comments on commit 07dba46

Please sign in to comment.