[vlc-devel] Problem with net_Read while reading single character

techfreak smile4you at gmx.ch
Sun Feb 3 14:35:17 CET 2008


I am implementing a VNC client as VLC video filter to get the OSD from a 
streaming server on top of the video stream.

At the moment I have the problem that the function net_Read sometimes 
returns with -1, always on line of code where I only read one single 
character with the message type for the next message. The messages 
window of VLC says "main error: Read error: Interrupted function call".

I didn't find any documentation about net_Read. What does the return 
value -1 mean? What may be wrong?

I'm cross-compiling under linux (ubuntu) for windows and running VLC on 

Here some lines of the code and below the output in messages.

rfbServerToClientMsg msg;
int i_read =  net_Read(p_filter, i_socket, NULL, (char*)&msg, 1, VLC_FALSE)
if (i_read > 0)
   ...continue reading the whole message
   msg_Err (p_filter, "Error %d while waiting next message on socket", 

This is the output in VLC messages:
osdvnc error: Waiting for next server message...
main error: Read error: Interrupted function call

osdvnc error: Error -1 while waiting next message on socket.

More information about the vlc-devel mailing list