History

command: fix spammy events when frame stepping forward with seek

The frame-step command also signals on up events. This is only useful when using the default "play" mode. For seek mode, it triggers another frame step which is not what you want. Rearrange the logic so the up event is ignored for the seek flag. The frames check is also not needed since add_step_frame already handles it. Fixes 9661a3839ba5af79e5620ce87acedf6cdaa244c1

Dudemanguy committed 1 year ago

Commit c7c09fd1 parent 35447281 file · +4 −3Browse files

Unified · Split

player/command.c+4−3
@@ -5688,7 +5688,10 @@ static void cmd_frame_step(void *p) · 5687 unmodified lines
56885688 return;
56895689 }
56905690
5691− if (frames > 0 && !flags && cmd->cmd->is_up_down) {
5691+ if (flags) {
5692+ if (!cmd->cmd->is_up)
5693+ add_step_frame(mpctx, frames, flags);
5694+ } else {
56925695 if (cmd->cmd->is_up) {
56935696 if (mpctx->step_frames < 1)
56945697 set_pause_state(mpctx, true);
@@ -5699,8 +5702,6 @@ static void cmd_frame_step(void *p) · 4 unmodified lines
56995702 add_step_frame(mpctx, frames, flags);
57005703 }
57015704 }
5702− } else {
5703− add_step_frame(mpctx, frames, flags);
57045705 }
57055706 }
57065707

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t