diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2011-07-04 19:10:17 +0000 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-06 13:01:08 +0300 |
commit | c89f72b561a83c11d1abb171b1a9d17bc51c3b42 (patch) | |
tree | 84ceb1579150b6b52f59e82c78b7f667cb5bde09 /stream/network.c | |
parent | 61fe3dcd6c87b96f02c5c0924b4124bc7a165d34 (diff) | |
download | mpv-c89f72b561a83c11d1abb171b1a9d17bc51c3b42.tar.bz2 mpv-c89f72b561a83c11d1abb171b1a9d17bc51c3b42.tar.xz |
stream/network: distinguish EOF/error in streaming control API
Signal EOF vs. error also via streaming control API (not yet evaluated).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33806 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/network.c')
-rw-r--r-- | stream/network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/network.c b/stream/network.c index b722023061..f6956e46da 100644 --- a/stream/network.c +++ b/stream/network.c @@ -467,7 +467,8 @@ nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctr 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 ); } |