diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-04-23 18:39:14 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 03:34:38 +0200 |
commit | 37901469827efed4b13fec40644d6b2de65b0639 (patch) | |
tree | 10d538b47a1d1d9720a3b1a3be7ee2f36be8d8d4 | |
parent | 0dc290269d925bd3bc7ed63a1b63edc13e8b2ab1 (diff) | |
download | mpv-37901469827efed4b13fec40644d6b2de65b0639.tar.bz2 mpv-37901469827efed4b13fec40644d6b2de65b0639.tar.xz |
stream: detect prematurely closed connection
Detect prematurely closed connection.
Then we get a streaming_stopped status but we have
a end_pos and have not reached it yet, do not accept
it as EOF but instead try reconnection.
For example a forced restart of a webserver will usually
result in the connection being closed before EOF.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34873 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
-rw-r--r-- | stream/stream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c index 7af8fa52fa..db389c45c7 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -291,7 +291,8 @@ int stream_read_internal(stream_t *s, void *buf, int len) #ifdef CONFIG_NETWORKING if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd, buf, len, s->streaming_ctrl); - if (s->streaming_ctrl->status == streaming_stopped_e) + if (s->streaming_ctrl->status == streaming_stopped_e && + (!s->end_pos || s->pos == s->end_pos)) s->eof = 1; } else #endif |