[Mplayer-cvslog] CVS: main/libmpdemux stream.c,1.52,1.53
Ross Finlayson CVS
rsf at mplayerhq.hu
Wed Apr 2 03:46:51 CEST 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv16575
Modified Files:
stream.c
Log Message:
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()".
Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- stream.c 16 Mar 2003 20:13:28 -0000 1.52
+++ stream.c 2 Apr 2003 01:46:47 -0000 1.53
@@ -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:
More information about the MPlayer-cvslog
mailing list