[MPlayer-cvslog] r33807 - trunk/stream/network.c

reimar subversion at mplayerhq.hu
Mon Jul 4 21:11:21 CEST 2011


Author: reimar
Date: Mon Jul  4 21:11:21 2011
New Revision: 33807

Log:
Ensure we do not add strange values to amount of buffered bytes
read on error.

Modified:
   trunk/stream/network.c

Modified: trunk/stream/network.c
==============================================================================
--- trunk/stream/network.c	Mon Jul  4 21:10:17 2011	(r33806)
+++ trunk/stream/network.c	Mon Jul  4 21:11:21 2011	(r33807)
@@ -457,6 +457,7 @@ nop_streaming_read( int fd, char *buffer
 		ret = recv( fd, buffer+len, size-len, 0 );
 		if( ret<0 ) {
 			mp_msg(MSGT_NETWORK,MSGL_ERR,"nop_streaming_read error : %s\n",strerror(errno));
+			ret = 0;
 		} else if (ret == 0)
 			stream_ctrl->status = streaming_stopped_e;
 		len += ret;


More information about the MPlayer-cvslog mailing list