#include <framework/mlt_frame.h>
}
-#include <string>
+#include <cstring>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <time.h>
#include <sys/time.h>
#include <string.h>
+#include <stdlib.h>
// libdv header files
#ifdef HAVE_LIBDV
framesWritten( 0 ), filename( "" )
{
/* empty body */
+ timeStamp = 0;
+ everyNthFrame = 0;
+ framesToSkip = 0;
+ maxFileSize = 0;
}
RawHandler::RawHandler() : fd( -1 )
{
extension = ".dv";
+ numBlocks = 0;
}
return false;
if ( read( fd, data, 4 ) < 0 )
return false;
- lseek( fd, 0, SEEK_SET );
+ if ( lseek( fd, 0, SEEK_SET ) < 0 )
+ return false;
numBlocks = ( ( data[ 3 ] & 0x80 ) == 0 ) ? 250 : 300;
filename = s;
return true;
extension = ".avi";
for ( int c = 0; c < 4; c++ )
audioChannels[ c ] = NULL;
+ memset( &dvinfo, 0, sizeof( dvinfo ) );
}
case AVI_DV1_FORMAT:
fail_null( avi = new AVI1File );
- if ( avi->Create( filename.c_str() ) == false )
+ if ( !avi || avi->Create( filename.c_str() ) == false )
return false;
//avi->Init( videoInfo.isPAL ? AVI_PAL : AVI_NTSC, audioInfo.frequency, AVI_LARGE_INDEX );
break;
case AVI_DV2_FORMAT:
fail_null( avi = new AVI2File );
- if ( avi->Create( filename.c_str() ) == false )
+ if ( !avi || avi->Create( filename.c_str() ) == false )
return false;
//if ( GetOpenDML() )
//avi->Init( videoInfo.isPAL ? AVI_PAL : AVI_NTSC, audioInfo.frequency,
{
Init();
- fd = quicktime_open( ( char * ) s, 1, 0 );
+ fd = quicktime_open( s, 1, 0 );
if ( fd == NULL )
{
fprintf( stderr, "Error opening: %s\n", s );