Add error message if the module is not valid

This commit is contained in:
2015-11-05 23:16:12 +00:00
parent f309ed6f3c
commit 250e524291
+6 -1
View File
@@ -211,6 +211,11 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] )
break;
}
}
if( !m_pcCurrModuleIf )
{
m_cCmdLineHandler.log( LOG_ERROR, "Invalid module! " );
return 2;
}
if( m_apcInputStreams.size() != m_pcCurrModuleIf->m_uiNumberOfFrames )
{
@@ -261,7 +266,7 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] )
pcModFrame = applyFrameModule();
}
PlaYUVerStream* pcModStream = new PlaYUVerStream;
if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), 8, 1, false ) )
if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(), 1, false ) )
{
delete pcModStream;
pcModStream = NULL;