Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / fileexr.C
index e786d4e9ea066dd0b78486098e29d725a2ff769e..a705f6c88c8b51eed59773db6201193ac3a23b47 100644 (file)
@@ -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;
+    }
 }