Catch exception in PlaYUVerTools

This commit is contained in:
jfmcarreira committed 2017-01-06 16:18:14 +00:00
1 parent 57c81319b2
commit 9091719dc9
1 file changed
+6 -2
+6 -2
View File
@@ -281,9 +281,13 @@ Int PlaYUVerTools::Open( Int argc, Char *argv[] )
pcModFrame = applyFrameModule();
}
PlaYUVerStream* pcModStream = new PlaYUVerStream;
if( !pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(),
pcModFrame->getEndianness(), 1, false ) )
try
{
pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(), pcModFrame->getEndianness(), 1, false );
}
catch( const char *msg )
{
log( LOG_ERROR, "Cannot open input stream %s with the following error %s!\n", outputFileNames[0].c_str(), msg );
delete pcModStream;
pcModStream = NULL;
return 2;