[MPlayer-cvslog] r32095 - trunk/udp_sync.c
reimar
subversion at mplayerhq.hu
Wed Sep 8 20:54:04 CEST 2010
Author: reimar
Date: Wed Sep 8 20:54:04 2010
New Revision: 32095
Log:
Simply parse all received packets even if we might overwrite the
values just afterwards.
The speed difference should not matter and the code is much simpler.
Modified:
trunk/udp_sync.c
Modified: trunk/udp_sync.c
==============================================================================
--- trunk/udp_sync.c Wed Sep 8 20:49:57 2010 (r32094)
+++ trunk/udp_sync.c Wed Sep 8 20:54:04 2010 (r32095)
@@ -113,17 +113,9 @@ static int get_udp(int blocking, float *
mesg[chars_received] = 0;
if (strcmp(mesg, "bye") == 0)
return 1;
+ sscanf(mesg, "%f", master_position);
}
- // UDP wait error, probably a timeout. Safe to ignore.
- if (chars_received == -1)
- return 0;
-
- // make sure we at least do not crash in case a
- // failed recvfrom has corrupted the buffer
- mesg[chars_received] = 0;
-
- sscanf(mesg, "%f", master_position);
return 0;
}
More information about the MPlayer-cvslog
mailing list