diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-10 13:22:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | cc76b517f6a74f813ae38137bdc88ff3bafa6dd9 (patch) | |
| tree | 34c2960763f897936efef689898a1f392fb38375 /src/lib/video_content.cc | |
| parent | a3073b3059e8df6304d2936ab2c605e6908a7373 (diff) | |
Allow content parts to not be preset in XML.
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index ff5a4cb17..75d94510a 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -75,6 +75,16 @@ VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film) } +shared_ptr<VideoContent> +VideoContent::from_xml (Content* parent, shared_ptr<const Film> film, cxml::ConstNodePtr node, int version) +{ + if (!node->optional_number_child<int> ("VideoWidth")) { + return shared_ptr<VideoContent> (); + } + + return shared_ptr<VideoContent> (new VideoContent (parent, film, node, version)); +} + VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, cxml::ConstNodePtr node, int version) : ContentPart (parent, film) { |
