* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include "config.h"
-
extern "C" {
#include <framework/mlt_frame.h>
}
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,