From: Alexey K. <akh...@us...> - 2007-02-14 23:49:25
|
Update of /cvsroot/aaf/AAF/ref-impl/src/impl In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv12701 Modified Files: ImplAAFFile.cpp Log Message: In file open methods use checkExpression() to verify file object model version. In the case of an error this ensures that the already opened file will be closed. Index: ImplAAFFile.cpp =================================================================== RCS file: /cvsroot/aaf/AAF/ref-impl/src/impl/ImplAAFFile.cpp,v retrieving revision 1.154 retrieving revision 1.155 diff -C2 -d -r1.154 -r1.155 *** ImplAAFFile.cpp 24 May 2006 18:01:51 -0000 1.154 --- ImplAAFFile.cpp 14 Feb 2007 23:49:21 -0000 1.155 *************** *** 322,332 **** // present, find out the version number to determine if // the file is legible. ! if (_head->GetObjectModelVersion() > ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion)) ! { ! // File version is higher than the version understood ! // by this toolkit. Therefore this file cannot be read. ! return AAFRESULT_FILEREV_DIFF; ! } } --- 322,330 ---- // present, find out the version number to determine if // the file is legible. ! // If file version is higher than the version understood ! // by this toolkit this file cannot be read. ! checkExpression(_head->GetObjectModelVersion() <= ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion), ! AAFRESULT_FILEREV_DIFF); } *************** *** 470,480 **** // present, find out the version number to determine if // the file is legible. ! if (_head->GetObjectModelVersion() > ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion)) ! { ! // File version is higher than the version understood ! // by this toolkit. Therefore this file cannot be read. ! return AAFRESULT_FILEREV_DIFF; ! } } --- 468,476 ---- // present, find out the version number to determine if // the file is legible. ! // If file version is higher than the version understood ! // by this toolkit this file cannot be read. ! checkExpression(_head->GetObjectModelVersion() <= ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion), ! AAFRESULT_FILEREV_DIFF); } *************** *** 1128,1139 **** // present, find out the version number to determine if // the file is legible. ! if (_head->GetObjectModelVersion() > ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion)) ! { ! // File version is higher than the version ! // understood by this toolkit. Therefore this file ! // cannot be read. ! return AAFRESULT_FILEREV_DIFF; ! } } // Now that the file is open and the header has been --- 1124,1132 ---- // present, find out the version number to determine if // the file is legible. ! // If file version is higher than the version understood ! // by this toolkit this file cannot be read. ! checkExpression(_head->GetObjectModelVersion() <= ! static_cast<aafUInt32>(sCurrentAAFObjectModelVersion), ! AAFRESULT_FILEREV_DIFF); } // Now that the file is open and the header has been |