mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 19:52:14 +00:00
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
This commit is contained in:
parent
0dc290269d
commit
3790146982
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user