From 290daefb79ec399cf7ba54968fc7e92e375e98d6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 25 Jul 2013 16:21:51 +0100 Subject: Try to be more careful when loading FrameInfos from disk. --- src/lib/writer.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/writer.cc') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 522ecc1c1..4c8a36597 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -411,6 +411,10 @@ Writer::check_existing_picture_mxf_frame (FILE* mxf, int f, Eyes eyes) /* Read the frame info as written */ ifstream ifi (_film->info_path (f, eyes).c_str()); libdcp::FrameInfo info (ifi); + if (info.size == 0) { + _film->log()->log (String::compose ("Existing frame %1 has no info file", f)); + return false; + } /* Read the data from the MXF and hash it */ fseek (mxf, info.offset, SEEK_SET); -- cgit v1.2.3