Some missing checks for allocation failures.
[dcpomatic.git] / src / lib / atmos_mxf_content.cc
index 4835442d5e5f01b3eb973f84ab7e888449d8e9f6..581b1b2f06c0efe0c13b19da9220356d399fe466 100644 (file)
@@ -32,6 +32,7 @@
 using std::list;
 using std::string;
 using boost::shared_ptr;
+using namespace dcpomatic;
 
 AtmosMXFContent::AtmosMXFContent (boost::filesystem::path path)
        : Content (path)
@@ -55,7 +56,7 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path)
                return true;
        } catch (dcp::MXFFileError& e) {
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
        }
 
@@ -96,3 +97,9 @@ AtmosMXFContent::full_length (shared_ptr<const Film> film) const
        FrameRateChange const frc (film, shared_from_this());
        return DCPTime::from_frames (llrint (_length * frc.factor()), film->video_frame_rate());
 }
+
+DCPTime
+AtmosMXFContent::approximate_length () const
+{
+       return DCPTime::from_frames (_length, 24);
+}