Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / fileexr.C
index e09dd1fcccfb642f41e2fd445f55908c7ddb8a60..a705f6c88c8b51eed59773db6201193ac3a23b47 100644 (file)
@@ -2,6 +2,7 @@
 /*
  * CINELERRA
  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -311,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);
@@ -425,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;
+    }
 }