]> git.sesse.net Git - vlc/blobdiff - modules/mux/avi.c
gettext 0.16.1 was an unintended change - sorry
[vlc] / modules / mux / avi.c
index be87b8edd2f1646f93494d74de7669edb0a0c780..b801b918ecf013e5ce008a15831c011af3c47667 100644 (file)
  *****************************************************************************/
 /* TODO: add OpenDML write support */
 
-#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
 #include <vlc_sout.h>
@@ -215,6 +218,7 @@ static void Close( vlc_object_t * p_this )
 
 static int Control( sout_mux_t *p_mux, int i_query, va_list args )
 {
+    VLC_UNUSED(p_mux);
     vlc_bool_t *pb_bool;
     char **ppsz;
 
@@ -401,8 +405,7 @@ static int Mux      ( sout_mux_t *p_mux )
 {
     sout_mux_sys_t  *p_sys = p_mux->p_sys;
     avi_stream_t    *p_stream;
-    int i_stream;
-    int i;
+    int i_stream, i;
 
     if( p_sys->b_write_header )
     {
@@ -425,14 +428,14 @@ static int Mux      ( sout_mux_t *p_mux )
         p_stream = &p_sys->stream[i_stream];
 
         p_fifo = p_mux->pp_inputs[i]->p_fifo;
-        i_count = p_fifo->i_depth;
+        i_count = block_FifoCount(  p_fifo );
         while( i_count > 1 )
         {
             avi_idx1_entry_t *p_idx;
             block_t *p_data;
 
             p_data = block_FifoGet( p_fifo );
-            if( p_fifo->i_depth > 0 )
+            if( block_FifoCount( p_fifo ) > 0 )
             {
                 block_t *p_next = block_FifoShow( p_fifo );
                 p_data->i_length = p_next->i_dts - p_data->i_dts;
@@ -546,7 +549,7 @@ static void bo_AddLWordBE( buffer_out_t *p_bo, uint64_t i )
 }
 #endif
 
-static void bo_AddFCC( buffer_out_t *p_bo, char *fcc )
+static void bo_AddFCC( buffer_out_t *p_bo, const char *fcc )
 {
     bo_AddByte( p_bo, fcc[0] );
     bo_AddByte( p_bo, fcc[1] );
@@ -657,9 +660,7 @@ static int avi_HeaderAdd_avih( sout_mux_t *p_mux,
 
     AVI_BOX_EXIT( 0 );
 }
-static int avi_HeaderAdd_strh( sout_mux_t   *p_mux,
-                               buffer_out_t *p_bo,
-                               avi_stream_t *p_stream )
+static int avi_HeaderAdd_strh( buffer_out_t *p_bo, avi_stream_t *p_stream )
 {
     AVI_BOX_ENTER( "strh" );
 
@@ -726,9 +727,7 @@ static int avi_HeaderAdd_strh( sout_mux_t   *p_mux,
     AVI_BOX_EXIT( 0 );
 }
 
-static int avi_HeaderAdd_strf( sout_mux_t *p_mux,
-                               buffer_out_t *p_bo,
-                               avi_stream_t *p_stream )
+static int avi_HeaderAdd_strf( buffer_out_t *p_bo, avi_stream_t *p_stream )
 {
     AVI_BOX_ENTER( "strf" );
 
@@ -772,14 +771,12 @@ static int avi_HeaderAdd_strf( sout_mux_t *p_mux,
     AVI_BOX_EXIT( 0 );
 }
 
-static int avi_HeaderAdd_strl( sout_mux_t *p_mux,
-                               buffer_out_t *p_bo,
-                               avi_stream_t *p_stream )
+static int avi_HeaderAdd_strl( buffer_out_t *p_bo, avi_stream_t *p_stream )
 {
     AVI_BOX_ENTER_LIST( "strl" );
 
-    avi_HeaderAdd_strh( p_mux, p_bo, p_stream );
-    avi_HeaderAdd_strf( p_mux, p_bo, p_stream );
+    avi_HeaderAdd_strh( p_bo, p_stream );
+    avi_HeaderAdd_strf( p_bo, p_stream );
 
     AVI_BOX_EXIT( 0 );
 }
@@ -809,7 +806,7 @@ static block_t *avi_HeaderCreateRIFF( sout_mux_t *p_mux )
     avi_HeaderAdd_avih( p_mux, &bo );
     for( i_stream = 0,i_maxbytespersec = 0; i_stream < p_sys->i_streams; i_stream++ )
     {
-        avi_HeaderAdd_strl( p_mux, &bo, &p_sys->stream[i_stream] );
+        avi_HeaderAdd_strl( &bo, &p_sys->stream[i_stream] );
     }
 
     i_junk = HDR_SIZE - bo.i_buffer - 8 - 12;