X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Ffileexr.C;h=9c782a112f8340e8f62023c4398ead416be07c35;hp=e786d4e9ea066dd0b78486098e29d725a2ff769e;hb=HEAD;hpb=f51838e3e7dec4553d8a85ad5c84c0e44764cae2 diff --git a/cinelerra-5.1/cinelerra/fileexr.C b/cinelerra-5.1/cinelerra/fileexr.C index e786d4e9..a705f6c8 100644 --- a/cinelerra-5.1/cinelerra/fileexr.C +++ b/cinelerra-5.1/cinelerra/fileexr.C @@ -312,6 +312,9 @@ int FileEXR::read_frame_header(char *path) int FileEXR::read_frame(VFrame *frame, VFrame *data) { + + try { + Imf::setGlobalThreadCount(file->cpus); EXRIStream exr_stream((char*)data->get_data(), data->get_compressed_size()); Imf::InputFile file(exr_stream); @@ -426,6 +429,10 @@ int FileEXR::read_frame(VFrame *frame, VFrame *data) } } return 0; + } catch (const std::exception &e) { + std::cerr << "error reading EXR image file:" << e.what() << std::endl; + return 1; + } }