Fix crash in initializing
In some enviroment, access violations occures in ICOpen. Althogh this code seems to intended to handle SEH, structured exceptions are not catched in current configulation.
This commit is contained in:
parent
7e185111a8
commit
ffc911474d
1 changed files with 9 additions and 1 deletions
|
@ -1061,11 +1061,19 @@ Tiio::AviWriterProperties::AviWriterProperties()
|
|||
if (!rc)
|
||||
break;
|
||||
HIC hic = 0;
|
||||
#ifdef _MSC_VER
|
||||
[&](){
|
||||
__try {
|
||||
hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE_QUERY);
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
}
|
||||
}();
|
||||
#else
|
||||
try {
|
||||
hic = ICOpen(icinfo.fccType, icinfo.fccHandler, ICMODE_QUERY);
|
||||
} catch (...) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (hic) {
|
||||
if (ICGetInfo(hic, &icinfo, sizeof(ICINFO)) == 0) // Find out the compressor name
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue