ImageContent::ImageContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
{
- video.reset (new VideoContent (this, film, node, version));
+ video = VideoContent::from_xml (this, film, node, version);
}
string
{
node->add_child("Type")->add_child_text ("Image");
Content::as_xml (node);
- video->as_xml (node);
+
+ if (video) {
+ video->as_xml (node);
+ }
}
void
{
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
- FrameRateChange const frc (video->frame_rate(), film->video_frame_rate());
+ FrameRateChange const frc (active_video_frame_rate(), film->video_frame_rate());
return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor ()), film->video_frame_rate ());
}