[Live-devel] win select() problem
Alessandro Gaiarin
alessandro.gaiarin at radiotrevisan.com
Thu Oct 28 13:45:06 PDT 2004
Hi all
i've used your playcommon test program to receive an audio streming. I
compiled it both in windows and in linux
and i noted that in linux it works perfectly while in windows it seems not
to manage rtcp packets. So i can manage
an rtcp BYE in windows: the program contiue cycling in doeventloop() and
doesn't stop.
I noted that when you arrive here:
while ((handler = iter.next()) != NULL) {
if (FD_ISSET(handler->socketNum, &readSet) &&
FD_ISSET(handler->socketNum, &fReadSet) /* sanity check */ &&
handler->handlerProc != NULL) {
(*handler->handlerProc)(handler->clientData, SOCKET_READABLE);
}
variables readSet and fReadSet are different so when you have to handle
rtcp socket, it doesn't find it in readSet and the if clause is
never true for this socket. The two variables are diffeent because select()
modifies the readSet fd_set...
I modified that code to avoid checking readSet ; in this way the program
blocks when it uses select() with the socket associate to the rtct port.
Has anybody experienced the same problem?
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live.com/pipermail/live-devel/attachments/20041028/570f2866/attachment.html
More information about the live-devel
mailing list