[Mplayer-cvslog] CVS: main/libmpdemux cache2.c,1.20,1.21 stream.c,1.63,1.64
Alban Bedel CVS
albeu at mplayerhq.hu
Sat Apr 12 15:53:36 CEST 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv10026/libmpdemux
Modified Files:
cache2.c stream.c
Log Message:
Fix cache uninit
Index: cache2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cache2.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- cache2.c 9 Feb 2003 20:18:22 -0000 1.20
+++ cache2.c 12 Apr 2003 13:53:33 -0000 1.21
@@ -196,6 +196,16 @@
return s;
}
+void cache_uninit(stream_t *s) {
+ cache_vars_t* c = s->cache_data;
+ if(!s->cache_pid) return;
+ kill(s->cache_pid,SIGKILL);
+ waitpid(s->cache_pid,NULL,0);
+ if(!c) return;
+ shmem_free(c->buffer,c->buffer_size);
+ shmem_free(s->cache_data,sizeof(cache_vars_t));
+}
+
static void exit_sighandler(int x){
// close stream
exit(0);
Index: stream.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- stream.c 10 Apr 2003 10:59:12 -0000 1.63
+++ stream.c 12 Apr 2003 13:53:33 -0000 1.64
@@ -391,10 +391,7 @@
// printf("\n*** free_stream() called ***\n");
#ifdef USE_STREAM_CACHE
if(s->cache_pid) {
-// kill(s->cache_pid,SIGTERM);
- kill(s->cache_pid,SIGKILL);
- waitpid(s->cache_pid,NULL,0);
- shmem_free(s->cache_data);
+ cache_uninit(s);
}
#endif
switch(s->type) {
More information about the MPlayer-cvslog
mailing list