From 2e2f77e346962dd2384d505ad297c07ecaadc83b Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 4 Jul 2011 19:14:06 +0000 Subject: 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 --- stream/stream.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stream/stream.c') 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) -- cgit v1.2.3