projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to be more careful when loading FrameInfos from disk.
[dcpomatic.git]
/
src
/
lib
/
writer.cc
diff --git
a/src/lib/writer.cc
b/src/lib/writer.cc
index 522ecc1c1d7a94265b1e296476bdbfb1f0f6f8c8..4c8a36597e56667bbbd0ff55c84211b4cf000e57 100644
(file)
--- 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);
/* 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);
/* Read the data from the MXF and hash it */
fseek (mxf, info.offset, SEEK_SET);