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

Uoti Urpala uoti.urpala at pp1.inet.fi
Sun Jan 25 20:54:57 CET 2009

On Sat, 2009-01-24 at 03:56 +1300, Dennis Vshivkov 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.

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. Making a complete fix for svn probably isn't worthwhile
(I've changed some of the related code in git, if a full fix is written
it's better based on that).

More information about the MPlayer-dev-eng mailing list