]> git.sesse.net Git - vlc/commitdiff
* Fixed a bug introduced in my previous commit which broke DVD input.
authorSam Hocevar <sam@videolan.org>
Wed, 30 May 2001 22:16:07 +0000 (22:16 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 30 May 2001 22:16:07 +0000 (22:16 +0000)
plugins/dvd/input_dvd.c
src/input/input.c

index af0467adfcf8548746330069e543cb47a2444647..8c1f6101f9ca078b0e4231c52114176a60d5f355 100644 (file)
@@ -10,7 +10,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.61 2001/05/30 17:03:12 sam Exp $
+ * $Id: input_dvd.c,v 1.62 2001/05/30 22:16:07 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -192,10 +192,6 @@ static void DVDInit( input_thread_t * p_input )
     p_input->p_plugin_data = (void *)p_dvd;
     p_input->p_method_data = NULL;
 
-    /* Set callback */
-    p_input->pf_open  = p_input->pf_file_open;
-    p_input->pf_close = p_input->pf_file_close;
-
     p_dvd->i_fd = p_input->i_handle;
 
     /* reading several block once seems to cause lock-up
index e444286d9a4b244d7603e6a68d3432fea7ca55ee..aa46afc39814f30dd34747ecbdeea162373c6cd1 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input.c,v 1.113 2001/05/30 17:03:12 sam Exp $
+ * $Id: input.c,v 1.114 2001/05/30 22:16:07 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -351,6 +351,10 @@ static int InitThread( input_thread_t * p_input )
     p_input->c_packets_trashed          = 0;
 #endif
 
+    /* Default, might get overwritten */
+    p_input->pf_open = p_input->pf_file_open;
+    p_input->pf_close = p_input->pf_file_close;
+
     p_input->p_input_module = module_Need( MODULE_CAPABILITY_INPUT,
                                            (probedata_t *)p_input );
 
@@ -363,8 +367,14 @@ static int InitThread( input_thread_t * p_input )
 
 #define f p_input->p_input_module->p_functions->input.functions.input
     p_input->pf_init          = f.pf_init;
-    p_input->pf_open          = f.pf_open;
-    p_input->pf_close         = f.pf_close;
+    if( f.pf_open != NULL )
+    {
+        p_input->pf_open          = f.pf_open;
+    }
+    if( f.pf_close != NULL )
+    {
+        p_input->pf_close         = f.pf_close;
+    }
     p_input->pf_end           = f.pf_end;
     p_input->pf_read          = f.pf_read;
     p_input->pf_set_area      = f.pf_set_area;