summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-06 16:36:17 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-06 16:36:17 +0000
commit9c0342b8975c2875fa827c2e9d0876fdf43b99b6 (patch)
treefef344c33cb5555f070453b333cbe2624e53fae3 /libmpdemux
parent0b6eb24b9a8034287f67f800fc61d07b7f018891 (diff)
downloadmpv-9c0342b8975c2875fa827c2e9d0876fdf43b99b6.tar.bz2
mpv-9c0342b8975c2875fa827c2e9d0876fdf43b99b6.tar.xz
Add netstream
A little 10L fix Call control(STREAM_CTRL_RESET) Close stream fd AFTER calling their close function (as some may still need it during close) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9854 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/stream.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libmpdemux/stream.c b/libmpdemux/stream.c
index 7fde82b3e1..f40c7267cb 100644
--- a/libmpdemux/stream.c
+++ b/libmpdemux/stream.c
@@ -62,12 +62,18 @@ void close_cdda(stream_t* s);
#ifdef HAVE_CDDA
extern stream_info_t stream_info_cdda;
#endif
+#ifdef STREAMING
+extern stream_info_t stream_info_netstream;
+#endif
extern stream_info_t stream_info_file;
stream_info_t* auto_open_streams[] = {
#ifdef HAVE_CDDA
&stream_info_cdda,
#endif
+#ifdef STREAMING
+ &stream_info_netstream,
+#endif
&stream_info_file,
NULL
};
@@ -115,7 +121,7 @@ stream_t* open_stream_plugin(stream_info_t* sinfo,char* filename,int mode,
if(s->flags & STREAM_SEEK && !s->seek)
s->flags &= ~STREAM_SEEK;
if(s->seek && !(s->flags & STREAM_SEEK))
- s->flags &= STREAM_SEEK;
+ s->flags |= STREAM_SEEK;
mp_msg(MSGT_OPEN,MSGL_V, "STREAM: [%s] %s\n",sinfo->name,filename);
@@ -370,6 +376,7 @@ void stream_reset(stream_t *s){
// s->buf_pos=s->buf_len=0;
s->eof=0;
}
+ if(s->control) s->control(s,STREAM_CTRL_RESET,NULL);
//stream_seek(s,0);
}
@@ -412,7 +419,6 @@ void free_stream(stream_t *s){
shmem_free(s->cache_data);
}
#endif
- if(s->fd>0) close(s->fd);
switch(s->type) {
#ifdef LIBSMBCLIENT
case STREAMTYPE_SMB:
@@ -432,6 +438,7 @@ void free_stream(stream_t *s){
default:
if(s->close) s->close(s);
}
+ if(s->fd>0) close(s->fd);
// Disabled atm, i don't like that. s->priv can be anything after all
// streams should destroy their priv on close
//if(s->priv) free(s->priv);