mirror of https://github.com/mpv-player/mpv
Do not queue empty cmd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25256 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8373b55173
commit
9870aa54e3
|
@ -1248,7 +1248,7 @@ static mp_cmd_t *read_events(int time, int paused)
|
|||
|
||||
int
|
||||
mp_input_queue_cmd(mp_cmd_t* cmd) {
|
||||
if(cmd_queue_length >= CMD_QUEUE_SIZE)
|
||||
if(!cmd || cmd_queue_length >= CMD_QUEUE_SIZE)
|
||||
return 0;
|
||||
cmd_queue[cmd_queue_end] = cmd;
|
||||
cmd_queue_end = (cmd_queue_end + 1) % CMD_QUEUE_SIZE;
|
||||
|
|
Loading…
Reference in New Issue