# HG changeset patch # User rsf # Date 1049248007 0 # Node ID c3b63fb0e8db1dbed01e744d89a8612880d4ac8b # Parent 177a3393057c9030caaa96ef7f69d068a98b3016 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()". diff -r 177a3393057c -r c3b63fb0e8db libmpdemux/stream.c --- a/libmpdemux/stream.c Wed Apr 02 01:38:07 2003 +0000 +++ b/libmpdemux/stream.c Wed Apr 02 01:46:47 2003 +0000 @@ -56,7 +56,7 @@ 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: