fix: keep seek target visible until acknowledged and make volume thumb opaque

This commit is contained in:
2026-10-10 16:09:29 +02:00
parent c9b9264109
commit 9356ed8b4d
5 changed files with 48 additions and 15 deletions
+5
View File
@@ -137,6 +137,7 @@ struct Player {
state.status = PLAYER_OPENING;
state.revision = revision;
}
if (commands.back().action == Action::Seek) state.seek_pending = true;
wake.notify_one();
return true;
}
@@ -179,6 +180,10 @@ struct Player {
state.duration = duration;
state.has_audio = tracks[0].codec != nullptr;
state.has_video = tracks[1].codec != nullptr;
// The worker publishes only outside seek execution; retain pending for later queued seeks.
state.seek_pending = std::any_of(commands.begin(), commands.end(), [this](const Command &command) {
return command.action == Action::Seek && command.epoch == activeEpoch;
});
state.video_aspect_ratio = 0;
if (const auto *video = tracks[1].codec; video && video->width > 0 && video->height > 0) {
const auto aspect = av_guess_sample_aspect_ratio(format, format->streams[tracks[1].index], nullptr);
+2
View File
@@ -17,6 +17,8 @@ typedef struct PlayerState {
double duration;
bool has_audio;
bool has_video;
// True from accepted seek until all queued seeks on this timeline finish.
bool seek_pending;
// Display width / height, including sample aspect ratio; zero without video.
double video_aspect_ratio;
uint64_t revision;