[MPlayer-dev-eng] [PATCH] Network synchronized playback using UDP

Jason Holt jholt at google.com
Thu Feb 25 22:36:06 CET 2010


>
> Making it public and using it from anywhere else. I don't want a signal
> handler
> called from normal code.
>

I recall now why I added the exit_sighandler and EINTR code.  Without
checking for EINTR, if you ^C mplayer while it's waiting for a datagram from
the master, it doesn't die, since the signal got caught by the system.  So
in that case, you have to send mplayer a second signal before it dies.  So
that's why I'm calling the sighandler if we get EINTR.  I've added a comment
to that effect.

I'm happy to take it out if you prefer; it just means it's a little harder
to kill mplayer when using -udp-slave.

Sorry, I somehow imagined it was the variable you used for the return
> value.
> In this case it seems like long unfortunately is the right type :-(
>

reverted


>  > > > +        if (strcmp(mesg, "bye") == 0 || errno == EINTR) {
>
> The main point is that the code is definitely wrong because it prints a
> message that is wrong for EINTR.
>

My mistake.  I saw an earlier, different line and assumed you were proposing
to change it.  That check for EINTR is there because exit_sighandler wasn't
exiting immediately.  Once we decide what to do about EINTR I can fix that.


> I'll come back to the loop another time, but mostly I think the small
> tricky
> differences either need to go or the code be changed to be more
> self-explanatory
> about them, a huge comment is not good enough IMO.
>

I've commented the parts of the loop to make it clearer what's going on.
 Let me know if that helps, or if you see another way to make it clearer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-udp-patch-22.diff
Type: text/x-patch
Size: 17728 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100225/ed48f950/attachment.bin>


More information about the MPlayer-dev-eng mailing list