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

Alban Bedel albeu at free.fr
Fri Apr 12 12:03:40 CEST 2002


Hi Jindrich Makovicka,

on Thu, 11 Apr 2002 14:15:20 +0200 you wrote:

> 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.

Thx a lot. Sorry for the time it took, I don't have much time for mplayer nowadays.I commited 
something simillar to your patch. You can now use "seek 0 1\npause" as a stop command 
in your lircrc :)
BTW, If Gabu could update the doc about lirc/slave mode (or remove the sections and 
replace them with search -user, or links to the revelant mails at least) it would be GREAT.
	Albeu



More information about the MPlayer-dev-eng mailing list