diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-25 16:21:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-25 16:21:51 +0100 |
| commit | 290daefb79ec399cf7ba54968fc7e92e375e98d6 (patch) | |
| tree | 62a4388335991818eb85f5f9e3f0f498d792b024 /src/lib | |
| parent | 945460f71db55d8daa232df3d869cc604ae5a240 (diff) | |
Try to be more careful when loading FrameInfos from disk.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/job.h | 3 | ||||
| -rw-r--r-- | src/lib/writer.cc | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/job.h b/src/lib/job.h index eb09ba386..9b8b14a93 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -70,6 +70,9 @@ public: void ascend (); void descend (float); float overall_progress () const; + bool progress_unknown () const { + return _progress_unknown; + } boost::signals2::signal<void()> Progress; /** Emitted from the UI thread when the job is finished */ 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); |
