[MPlayer-dev-eng] [PATCH] Multi-code events get LIRC input out of sync

Dennis Vshivkov jaimor at orcon.net.nz
Mon Jan 26 03:40:43 CET 2009


On Sun, Jan 25, 2009 at 09:54:57PM +0200, Uoti Urpala wrote:

 >> attached is a patch I've been using for a few months in my
 >> personal MPlayer Debian package.

 > I think the problem description is a bit unclear. Do I
 > understand correctly that the problem with the current code
 > is as follows: MPlayer only calls lirc_nextcode() once when
 > the file descriptor becomes readable. However that function
 > always reads all the input (or at least multiple values) from
 > the fd even though it only returns one value, so it should be
 > called repeatedly until there is no more output to ensure you
 > got all the values it buffered. Otherwise there will be data
 > in lirc's internal buffers, but it won't be read since it has
 > been moved away from the fd where select would see it.

Yes, you got it absolutely right.

 > The correct behavior would be to register the fd in the main
 > select() in input.c and then read all input when the fd
 > becomes readable. However your patch probably is an
 > improvement over the current code which is certainly wrong.

I thought exactly the same.

-- 
/Dennis Vshivkov <jaimor at orcon.net.nz>



More information about the MPlayer-dev-eng mailing list