summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-22 11:27:55 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-22 11:27:55 +0100
commit9adf0dc99f0da3d45950a693193b9123d025b668 (patch)
tree99eea55571a76030844763cd0499273d1b539d93
parentac35bf2a80c9afae9dc5fcb0261929053162f44d (diff)
Write subtitle intrinsic durations to match the picture in the reel; sort out test fiasco after making libdcp compare DCPs properly again.
-rw-r--r--src/lib/transcoder.cc3
-rw-r--r--src/lib/writer.cc2
-rw-r--r--test/test.cc1
-rw-r--r--test/wscript1
4 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc
index 1012c4544..9d8eebe25 100644
--- a/src/lib/transcoder.cc
+++ b/src/lib/transcoder.cc
@@ -62,7 +62,8 @@ Transcoder::go ()
_encoder->begin ();
DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ());
- for (DCPTime t; t < _film->length(); t += frame) {
+ DCPTime const length = _film->length ();
+ for (DCPTime t; t < length; t += frame) {
list<shared_ptr<PlayerVideo> > v = _player->get_video (t, true);
for (list<shared_ptr<PlayerVideo> >::const_iterator i = v.begin(); i != v.end(); ++i) {
_encoder->enqueue (*i);
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index c34a6a66d..c594a6446 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -466,7 +466,7 @@ Writer::finish ()
new dcp::ReelSubtitleAsset (
_subtitle_content,
dcp::Fraction (_film->video_frame_rate(), 1),
- _subtitle_content->latest_subtitle_out().to_seconds() * _film->video_frame_rate(),
+ _picture_mxf->intrinsic_duration (),
0
)
));
diff --git a/test/test.cc b/test/test.cc
index 4466b74cb..cbf4b5d4d 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -162,6 +162,7 @@ check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
options.max_audio_sample_error = 255;
options.cpl_annotation_texts_can_differ = true;
options.mxf_names_can_differ = true;
+ options.reel_hashes_can_differ = true;
BOOST_CHECK (ref_dcp.equals (check_dcp, options, boost::bind (note, _1, _2)));
}
diff --git a/test/wscript b/test/wscript
index 3345d9eb8..493836a7a 100644
--- a/test/wscript
+++ b/test/wscript
@@ -37,6 +37,7 @@ def build(bld):
film_metadata_test.cc
frame_rate_test.cc
image_test.cc
+ import_dcp_test.cc
isdcf_name_test.cc
job_test.cc
make_black_test.cc