Update of /cvsroot/xine/xine-lib/src/input/vcd
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29609/src/input/vcd

Modified Files:
        xineplug_inp_vcd.c 
Log Message:
Close the device after building the MRL list if it wasn't previously open.
Holding it open prevents eject from working.

Index: xineplug_inp_vcd.c
===================================================================
RCS file: /cvsroot/xine/xine-lib/src/input/vcd/xineplug_inp_vcd.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- xineplug_inp_vcd.c  10 Jul 2006 22:08:29 -0000      1.50
+++ xineplug_inp_vcd.c  13 Dec 2006 19:21:10 -0000      1.51
@@ -322,6 +322,7 @@
   unsigned int n, i=0;
   unsigned int i_entries;
   vcdinfo_obj_t *p_vcdinfo;
+  int was_open;
 
   if (NULL == class) {
     LOG_MSG("%s", _("was passed a null class parameter"));
@@ -331,7 +332,7 @@
   vcdplayer = &(my_vcd.player);
 
   /* If VCD already open, we gotta close and stop it. */
-  if (vcdplayer->b_opened) {
+  if ((was_open = vcdplayer->b_opened)) {
     vcd_close(class);
   }
 
@@ -374,6 +375,8 @@
   if (NULL == class->mrls) {
     LOG_ERR("Can't calloc %d MRL entries", class->num_mrls);
     class->num_mrls = 0;
+    if (!was_open)
+      vcdio_close(vcdplayer);
     return false;
   }
 
@@ -445,6 +448,8 @@
             class->mrl_track_offset, class->mrl_entry_offset, 
             class->mrl_play_offset,  class->mrl_segment_offset);
   
+  if (!was_open)
+    vcdio_close(vcdplayer);
   return true;
 }
 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog

Reply via email to