summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-07-04 19:14:06 +0000
committerUoti Urpala <uau@mplayer2.org>2011-07-06 13:01:08 +0300
commit2e2f77e346962dd2384d505ad297c07ecaadc83b (patch)
treef1fdf7aa4bf7b62361f4bbebe18171e818dae861 /stream
parent93e206e0626c1c5827ec738e7a0dbe0538b64545 (diff)
downloadmpv-2e2f77e346962dd2384d505ad297c07ecaadc83b.tar.bz2
mpv-2e2f77e346962dd2384d505ad297c07ecaadc83b.tar.xz
stream.c: Pass streaming_ctrl eof on to struct stream field
Fixes a possible endless loop with HTTP files where seeking to the very end returns the full file again instead of e.g. an error. Apache/2.2.4 seems to show this behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33808 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 4b55072561..a18739eb8c 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -287,6 +287,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)
+ s->eof = 1;
} else
#endif
if (s->fill_buffer)