changeset 6479:45ec7f24de06

Add uninit to the dvd stream.
author albeu
date Fri, 21 Jun 2002 16:26:40 +0000
parents feb97a44080b
children 0dcaa477d200
files libmpdemux/open.c libmpdemux/stream.c
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/open.c	Fri Jun 21 16:01:18 2002 +0000
+++ b/libmpdemux/open.c	Fri Jun 21 16:26:40 2002 +0000
@@ -686,4 +686,11 @@
 
 }
 
+void dvd_close(dvd_priv_t *d) {
+  ifoClose(d->vts_file);
+  ifoClose(d->vmg_file);
+  DVDCloseFile(d->title);
+  DVDClose(d->dvd);
+}
+
 #endif
--- a/libmpdemux/stream.c	Fri Jun 21 16:01:18 2002 +0000
+++ b/libmpdemux/stream.c	Fri Jun 21 16:26:40 2002 +0000
@@ -278,10 +278,17 @@
     waitpid(s->cache_pid,NULL,0);
   }
   if(s->fd>0) close(s->fd);
+  switch(s->type) {
 #ifdef HAVE_CDDA
-  if(s->type == STREAMTYPE_CDDA)
+  case STREAMTYPE_CDDA:
     close_cdda(s);
+    break;
 #endif
+#ifdef USE_DVDREAD
+  case STREAMTYPE_DVD:
+    dvd_close(s->priv);
+#endif
+  }  
   if(s->priv) free(s->priv);
   free(s);
 }