]> git.sesse.net Git - vlc/blobdiff - src/input/input_netlist.c
A BIG kludge for the calculation of mux_rate, so that times displayed in
[vlc] / src / input / input_netlist.c
index 930e121927c532dbe387c9027091acdebd4775b8..d48e52ec2a01979632b3aff1cbcd706766fd35f6 100644 (file)
@@ -2,7 +2,7 @@
  * input_netlist.c: netlist management
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.36 2001/05/06 04:32:02 sam Exp $
+ * $Id: input_netlist.c,v 1.40 2001/07/17 09:48:08 massiot Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
 #include <stdlib.h>
 #include <string.h>                                    /* memcpy(), memset() */
 #include <sys/types.h>
-#include <unistd.h>
 
-#ifndef WIN32 
+#ifdef HAVE_UNISTD_H
+#   include <unistd.h>
+#endif
+
+#if !defined( WIN32 )
 #   include <sys/uio.h>                                      /* struct iovec */
 #else
-    struct iovec
-    {
-        void *iov_base; /* Pointer to data.  */
-        size_t iov_len; /* Length of data.  */
-    };
+#   include <io.h>
+#   include "input_iovec.h"
 #endif
 
 #include "config.h"
@@ -50,9 +50,7 @@
 #include "stream_control.h"
 #include "input_ext-intf.h"
 #include "input_ext-dec.h"
-
-#include "input.h"
-#include "input_netlist.h"
+#include "input_ext-plugins.h"
 
 /*****************************************************************************
  * input_NetlistInit: allocates netlist buffers and init indexes
@@ -81,14 +79,20 @@ int input_NetlistInit( input_thread_t * p_input, int i_nb_data, int i_nb_pes,
      * the netlist_t struct */
     /* As i_loop is unsigned int, and i_ns_data int, this shouldn't be a 
      * problem */
-    for( i_loop=1; i_loop < i_nb_data; i_loop*=2 )
+    for( i_loop = 1; i_loop < i_nb_data; i_loop *= 2 )
+    {
         ;
+    }
+
     intf_DbgMsg( "Netlist : Required %i byte, got %u",i_nb_data,i_loop );
     i_nb_data = i_loop;
 
     /* Same thing for i_nb_pes */
-    for( i_loop=1; i_loop < i_nb_data; i_loop*=2 )
+    for( i_loop = 1; i_loop < i_nb_data; i_loop *= 2 )
+    {
         ;
+    }
+
     intf_DbgMsg( "Netlist : Required %i byte, got %u",i_nb_data,i_loop );
     i_nb_data = i_loop;