changeset 33718:b4c4ee25269f

Signal EOF vs. error also via streaming control API (not yet evaluated).
author reimar
date Mon, 04 Jul 2011 19:10:17 +0000
parents 6ef02828040f
children 1a7ac6b2d447
files stream/network.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/network.c	Mon Jul 04 00:36:08 2011 +0000
+++ b/stream/network.c	Mon Jul 04 19:10:17 2011 +0000
@@ -457,7 +457,8 @@
 		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));
-		}
+		} else if (ret == 0)
+			stream_ctrl->status = streaming_stopped_e;
 		len += ret;
 //printf("read %d bytes from network\n", len );
 	}