[MPlayer-dev-eng] [PATCH] input.c cannot handle multiple commands in the queue

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Thu Apr 11 14:15:20 CEST 2002


Hi folks,

I sent this patch two days ago and got no reply, so trying again.

In mp_input_read_cmd, when more than one command are present in the 
buffer, the buffer gets shifted for one char less (without a newline). 
This means mplayer stops receiving commands from this source because it 
reads just an empty line.

After fixing this, another problem popped up because mp_input_read_cmds 
doesn't check for pending commands and just does a select to check the 
file descriptors. This means that the queue cannot be flushed - it 
causes funny behavior with lirc because once the queue grows, when a 
button is pressed, a command that was issued a while ago is executed 
instead. I fixed this by (i hope) properly setting the MP_FD_GOT_CMD in 
mp_input_read_cmd and checking for this in mp_input_read_cmds so the 
queues with MP_FD_GOT_CMD set get processed even if select is negative.

I really would like to have this fix in the CVS. As I had a look into 
mplayer-users there were some folks complaining about the same problem 
so I won't probably be the only one who'd appreciate it.

-- 
Jindrich Makovicka

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: input.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020411/2362c2ad/attachment.asc>


More information about the MPlayer-dev-eng mailing list