* Change log:
*
* $Log$
+* Revision 1.3 2005/07/25 07:21:39 lilo_booter
+* + fixes for opendml dv avi
+*
* Revision 1.2 2005/06/21 20:59:39 lilo_booter
* src/framework/mlt_consumer.c src/framework/mlt_consumer.h
* + Added a general profile handling for size, aspect ratio and display ratio
avih_chunk = FindDirectoryEntry( make_fourcc( "avih" ) );
if ( avih_chunk != -1 )
- ReadChunk( avih_chunk, ( void* ) & mainHdr );
+ ReadChunk( avih_chunk, ( void* ) & mainHdr, sizeof( MainAVIHeader ) );
}
indx_chunk[ 0 ] = FindDirectoryEntry( make_fourcc( "indx" ) );
if ( indx_chunk[ 0 ] != -1 )
{
- ReadChunk( indx_chunk[ 0 ], ( void* ) indx[ 0 ] );
+ ReadChunk( indx_chunk[ 0 ], ( void* ) indx[ 0 ], sizeof( AVISuperIndex ) );
index_type = AVI_LARGE_INDEX;
/* recalc number of frames from each index */
idx1_chunk = FindDirectoryEntry( make_fourcc( "idx1" ) );
if ( idx1_chunk != -1 )
{
- ReadChunk( idx1_chunk, ( void* ) idx1 );
+ ReadChunk( idx1_chunk, ( void* ) idx1, sizeof( AVISuperIndex ) );
idx1->nEntriesInUse = GetDirectoryEntry( idx1_chunk ).length / 16;
index_type = AVI_SMALL_INDEX;
while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
{
- ReadChunk( i, ( void* ) & avi_stream_header );
+ ReadChunk( i, ( void* ) & avi_stream_header, sizeof( AVIStreamHeader ) );
if ( avi_stream_header.fccHandler == type )
return true;
}
j = 0;
while ( ( i = FindDirectoryEntry( strf, j++ ) ) != -1 )
{
- ReadChunk( i, ( void* ) & bih );
+ ReadChunk( i, ( void* ) & bih, sizeof( BITMAPINFOHEADER ) );
if ( ( FOURCC ) bih.biCompression == type )
return true;
}
while ( ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
{
- ReadChunk( i, ( void* ) & avi_stream_header );
+ ReadChunk( i, ( void* ) & avi_stream_header, sizeof( AVIStreamHeader ) );
if ( avi_stream_header.fccType == type )
return true;
}
while ( ( k = FindDirectoryEntry( strf, j++ ) ) != -1 )
{
- ReadChunk( k, ( void* ) & bih );
+ ReadChunk( k, ( void* ) & bih, sizeof( BITMAPINFOHEADER ) );
bih.biCompression = handler;
}
}
while ( ( result == false ) && ( i = FindDirectoryEntry( strh, j++ ) ) != -1 )
{
- ReadChunk( i, ( void* ) & avi_stream_header );
+ ReadChunk( i, ( void* ) & avi_stream_header, sizeof( AVIStreamHeader ) );
if ( avi_stream_header.fccType == type )
{
FOURCC chunkID;
* Change log:
*
* $Log$
+* Revision 1.2 2005/07/25 07:21:39 lilo_booter
+* + fixes for opendml dv avi
+*
* Revision 1.1 2005/04/15 14:28:26 lilo_booter
* Initial version
*
*/
-void RIFFFile::ReadChunk( int chunk_index, void *data )
+void RIFFFile::ReadChunk( int chunk_index, void *data, off_t data_len )
{
RIFFDirEntry entry;
entry = GetDirectoryEntry( chunk_index );
pthread_mutex_lock( &file_mutex );
fail_if( lseek( fd, entry.offset, SEEK_SET ) == ( off_t ) - 1 );
- fail_neg( read( fd, data, entry.length ) );
+ fail_neg( read( fd, data, data_len ) );
pthread_mutex_unlock( &file_mutex );
}
* Change log:
*
* $Log$
+* Revision 1.2 2005/07/25 07:21:39 lilo_booter
+* + fixes for opendml dv avi
+*
* Revision 1.1 2005/04/15 14:28:26 lilo_booter
* Initial version
*
virtual void ParseChunk( int parent );
virtual void ParseList( int parent );
virtual void ParseRIFF( void );
- virtual void ReadChunk( int chunk_index, void *data );
+ virtual void ReadChunk( int chunk_index, void *data, off_t data_len );
virtual void WriteChunk( int chunk_index, const void *data );
virtual void WriteRIFF( void );