ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film)
{
- video.reset (new VideoContent (this, film));
+ video.reset (new VideoContent (this));
if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
_paths.push_back (p);
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, 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