[vlc-commits] AVI: cosmetics
Jean-Baptiste Kempf
git at videolan.org
Thu Jul 26 23:21:44 CEST 2012
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jul 26 11:13:35 2012 +0200| [a18bc8ed46998dd6d3cef5af15f89cf8c9c10e0a] | committer: Jean-Baptiste Kempf
AVI: cosmetics
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a18bc8ed46998dd6d3cef5af15f89cf8c9c10e0a
---
modules/demux/avi/avi.c | 19 +++++++++----------
modules/demux/avi/libavi.c | 5 ++---
modules/demux/avi/libavi.h | 19 ++++++++++---------
3 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 81ec46c..23dad19 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -3,6 +3,7 @@
*****************************************************************************
* Copyright (C) 2001-2009 the VideoLAN team
* $Id$
+ *
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -50,7 +51,6 @@
*****************************************************************************/
#define INTERLEAVE_TEXT N_("Force interleaved method" )
-#define INTERLEAVE_LONGTEXT N_( "Force interleaved method." )
#define INDEX_TEXT N_("Force index creation")
#define INDEX_LONGTEXT N_( \
@@ -75,7 +75,7 @@ vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_DEMUX )
add_bool( "avi-interleaved", false,
- INTERLEAVE_TEXT, INTERLEAVE_LONGTEXT, true )
+ INTERLEAVE_TEXT, INTERLEAVE_TEXT, true )
add_integer( "avi-index", 0,
INDEX_TEXT, INDEX_LONGTEXT, false )
change_integer_list( pi_index, ppsz_indexes )
@@ -577,10 +577,10 @@ static int Open( vlc_object_t * p_this )
fmt.video.p_palette = calloc( 1, sizeof(video_palette_t) );
fmt.video.p_palette->i_entries = __MIN(fmt.i_extra/4, 256);
- for( int i = 0; i < fmt.video.p_palette->i_entries; i++ )
+ for( int k = 0; k < fmt.video.p_palette->i_entries; k++ )
{
for( int j = 0; j < 4; j++ )
- fmt.video.p_palette->palette[i][j] = p_pal[4*i+j];
+ fmt.video.p_palette->palette[k][j] = p_pal[4*k+j];
}
}
}
@@ -775,10 +775,9 @@ error:
static void Close ( vlc_object_t * p_this )
{
demux_t * p_demux = (demux_t *)p_this;
- unsigned int i;
demux_sys_t *p_sys = p_demux->p_sys ;
- for( i = 0; i < p_sys->i_track; i++ )
+ for( unsigned int i = 0; i < p_sys->i_track; i++ )
{
if( p_sys->track[i] )
{
@@ -787,8 +786,10 @@ static void Close ( vlc_object_t * p_this )
}
}
free( p_sys->track );
+
AVI_ChunkFreeRoot( p_demux->s, &p_sys->ck_root );
vlc_meta_Delete( p_sys->meta );
+
for( unsigned i = 0; i < p_sys->i_attachment; i++)
vlc_input_attachment_Delete(p_sys->attachment[i]);
free(p_sys->attachment);
@@ -1310,18 +1311,16 @@ static int Demux_UnSeekable( demux_t *p_demux )
*****************************************************************************/
static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
{
-
demux_sys_t *p_sys = p_demux->p_sys;
msg_Dbg( p_demux, "seek requested: %"PRId64" seconds %d%%",
i_date / 1000000, i_percent );
if( p_sys->b_seekable )
{
- unsigned i_stream;
-
if( !p_sys->i_length )
{
avi_track_t *p_stream = NULL;
+ unsigned i_stream;
int64_t i_pos;
/* use i_percent to create a true i_date */
@@ -1380,7 +1379,7 @@ static int Seek( demux_t *p_demux, mtime_t i_date, int i_percent )
}
/* */
- for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
+ for( unsigned i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
{
avi_track_t *p_stream = p_sys->track[i_stream];
diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index 3e5d54b..06a3661 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -26,13 +26,13 @@
#endif
#include <vlc_common.h>
-#include <vlc_demux.h>
+#include <vlc_demux.h> /* stream_*, *_ES */
#include <vlc_codecs.h> /* VLC_BITMAPINFOHEADER */
#include "libavi.h"
#ifndef NDEBUG
-#define AVI_DEBUG 1
+# define AVI_DEBUG 1
#endif
#define __EVEN( x ) (((x) + 1) & ~1)
@@ -1045,4 +1045,3 @@ void *_AVI_ChunkFind( avi_chunk_t *p_chk,
return NULL;
}
-
diff --git a/modules/demux/avi/libavi.h b/modules/demux/avi/libavi.h
index c2d720d..2960b41 100644
--- a/modules/demux/avi/libavi.h
+++ b/modules/demux/avi/libavi.h
@@ -38,10 +38,10 @@
/* the keyframe flag isn't a true flag */
/* but have to be verified */
-#define AVI_CHUNK_COMMON \
- vlc_fourcc_t i_chunk_fourcc; \
- uint64_t i_chunk_size; \
- uint64_t i_chunk_pos; \
+#define AVI_CHUNK_COMMON \
+ vlc_fourcc_t i_chunk_fourcc; \
+ uint64_t i_chunk_size; \
+ uint64_t i_chunk_pos; \
union avi_chunk_u *p_next; \
union avi_chunk_u *p_father; \
union avi_chunk_u *p_first; \
@@ -57,6 +57,7 @@ typedef struct idx1_entry_s
uint32_t i_length;
} idx1_entry_t;
+
typedef struct avi_chunk_common_s
{
AVI_CHUNK_COMMON
@@ -247,15 +248,15 @@ typedef union avi_chunk_u
* Stream(input) access functions
****************************************************************************/
int AVI_ChunkRead( stream_t *,
- avi_chunk_t *p_chk,
- avi_chunk_t *p_father );
+ avi_chunk_t *p_chk,
+ avi_chunk_t *p_father );
void AVI_ChunkFree( stream_t *, avi_chunk_t * );
int _AVI_ChunkCount( avi_chunk_t *, vlc_fourcc_t );
void *_AVI_ChunkFind ( avi_chunk_t *, vlc_fourcc_t, int );
int AVI_ChunkReadRoot( stream_t *, avi_chunk_t *p_root );
-void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
+void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
#define AVI_ChunkCount( p_chk, i_fourcc ) \
_AVI_ChunkCount( AVI_CHUNK(p_chk), i_fourcc )
@@ -349,9 +350,9 @@ void AVI_ChunkFreeRoot( stream_t *, avi_chunk_t *p_chk );
#define AVITWOCC_tx VLC_TWOCC('t','x')
#define AVITWOCC_sb VLC_TWOCC('s','b')
- /* *** codex stuff *** */
+/* *** codex stuff *** */
- /* DV */
+/* DV */
#define FOURCC_dvsd VLC_FOURCC('d','v','s','d')
#define FOURCC_dvhd VLC_FOURCC('d','v','h','d')
#define FOURCC_dvsl VLC_FOURCC('d','v','s','l')
More information about the vlc-commits
mailing list