From bbb4b7b18fde3708e0d40f8f5829d0c8e2b0ce11 Mon Sep 17 00:00:00 2001 From: rsf Date: Wed, 2 Apr 2003 01:46:47 +0000 Subject: Added a test for "s->fd == NULL" to the start of "stream_fill_buffer()". ("fd" is NULL if the session is defined by a SDP file, for example.) It turns out that this test is necessary only for Solaris, not Linux, because in Linux, "s->eof" got set after the prior (failing) call to "lseek()" in "stream_seek_long()". In Solaris, however, "lseek(NULL, ...)" returns 0 (go figure!) rather than -1, so "s->eof" doesn't get set in "stream_seek_long()". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9788 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c index ac1fb49d75..f89a5afd52 100644 --- a/libmpdemux/stream.c +++ b/libmpdemux/stream.c @@ -56,7 +56,7 @@ void close_cdda(stream_t* s); int stream_fill_buffer(stream_t *s){ int len; - if(s->eof){ s->buf_pos=s->buf_len=0; return 0; } + if (s->fd == NULL || s->eof) { s->buf_pos = s->buf_len = 0; return 0; } switch(s->type){ #ifdef LIBSMBCLIENT case STREAMTYPE_SMB: -- cgit v1.2.3