Mercurial > mplayer.hg
changeset 33719:1a7ac6b2d447
Ensure we do not add strange values to amount of buffered bytes
read on error.
author | reimar |
---|---|
date | Mon, 04 Jul 2011 19:11:21 +0000 |
parents | b4c4ee25269f |
children | 0cb1d3b6539d |
files | stream/network.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/network.c Mon Jul 04 19:10:17 2011 +0000 +++ b/stream/network.c Mon Jul 04 19:11:21 2011 +0000 @@ -457,6 +457,7 @@ 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;