--- ../dvgrab-2.1-orig/avi.cc	2006-03-04 14:20:39 +0900
+++ avi.cc	2007-02-27 07:46:12 +0900
@@ -1062,11 +1062,13 @@
 	odml_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "odml" ), RIFF_LISTSIZE, hdrl_list );
 	dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
 
+#if 0
 	/* align movi list to block */
 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
 	num_blocks = length / PADDING_SIZE + 1;
 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5?
 	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
+#endif
 
 	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
 
@@ -1155,6 +1157,7 @@
 			//junk_chunk = AddDirectoryEntry(make_fourcc("JUNK"), 0, PADDING_1GB - length - 5 * RIFF_HEADERSIZE, riff_list);
 			//WriteChunk(junk_chunk, g_zeroes);
 
+#if 0
 			/* padding for alignment */
 			GetDirectoryEntry( riff_list, type, name, length, offset, parent );
 			num_blocks = ( length + 4 * RIFF_HEADERSIZE ) / PADDING_SIZE + 1;
@@ -1164,6 +1167,7 @@
 				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
 				WriteChunk( junk_chunk, g_zeroes );
 			}
+#endif
 
 			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
 			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
@@ -1368,7 +1372,9 @@
 	strl_list[ 1 ] = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "strl" ), RIFF_LISTSIZE, hdrl_list );
 	strh_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strh" ), 0, sizeof( AVIStreamHeader ), strl_list[ 1 ] );
 	strf_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "strf" ), 0, sizeof( WAVEFORMATEX ) - 2, strl_list[ 1 ] );
+#if 0
 	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, 2, strl_list[ 1 ] );
+#endif
 	if ( index_type & AVI_LARGE_INDEX )
 	{
 		indx_chunk[ 1 ] = AddDirectoryEntry( make_fourcc( "indx" ), 0, sizeof( AVISuperIndex ), strl_list[ 1 ] );
@@ -1379,11 +1385,13 @@
 		dmlh_chunk = AddDirectoryEntry( make_fourcc( "dmlh" ), 0, 0x00f8, odml_list );
 	}
 
+#if 0
 	/* align movi list to block */
 	GetDirectoryEntry( hdrl_list, type, name, length, offset, parent );
 	num_blocks = length / PADDING_SIZE + 1;
 	length = num_blocks * PADDING_SIZE - length - 5 * RIFF_HEADERSIZE; // why 5 headers?
 	junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
+#endif
 
 	movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
 
@@ -1525,6 +1533,7 @@
 
 		if ( index_type & AVI_LARGE_INDEX )
 		{
+#if 0
 			/* padding for alignment */
 			GetDirectoryEntry( riff_list, type, name, length, offset, parent );
 			num_blocks = ( length + 4 * RIFF_HEADERSIZE ) / PADDING_SIZE + 1;
@@ -1534,6 +1543,7 @@
 				junk_chunk = AddDirectoryEntry( make_fourcc( "JUNK" ), 0, length, riff_list );
 				WriteChunk( junk_chunk, g_zeroes );
 			}
+#endif
 
 			riff_list = AddDirectoryEntry( make_fourcc( "RIFF" ), make_fourcc( "AVIX" ), RIFF_LISTSIZE, file_list );
 			movi_list = AddDirectoryEntry( make_fourcc( "LIST" ), make_fourcc( "movi" ), RIFF_LISTSIZE, riff_list );
