diff options
| -rw-r--r-- | src/lib/film.cc | 5 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index bdd650437..50b1b4fad 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -87,8 +87,11 @@ using dcp::raw_convert; * Subtitle offset changed to subtitle y offset, and subtitle x offset added. * 7 -> 8 * Use <Scale> tag in <VideoContent> rather than <Ratio>. + * + * Bumped to 32 for 2.0 branch; some times are expressed in Times rather + * than frames now. */ -int const Film::current_state_version = 8; +int const Film::current_state_version = 32; /** Construct a Film object in a given directory. * diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 9c8ecf0bb..58053c822 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -85,10 +85,17 @@ VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p) VideoContent::VideoContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version) : Content (f, node) { - _video_length = ContentTime (node->number_child<int64_t> ("VideoLength")); _video_size.width = node->number_child<int> ("VideoWidth"); _video_size.height = node->number_child<int> ("VideoHeight"); _video_frame_rate = node->number_child<float> ("VideoFrameRate"); + + if (version < 32) { + /* DCP-o-matic 1.0 branch */ + _video_length = ContentTime::from_frames (node->number_child<int64_t> ("VideoLength"), _video_frame_rate); + } else { + _video_length = ContentTime (node->number_child<int64_t> ("VideoLength")); + } + _video_frame_type = static_cast<VideoFrameType> (node->number_child<int> ("VideoFrameType")); _crop.left = node->number_child<int> ("LeftCrop"); _crop.right = node->number_child<int> ("RightCrop"); |
