diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-24 01:52:23 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-24 01:52:23 +0000 |
| commit | 8bef34f672815c3c9b4236d06fdee8dfd0bffbc2 (patch) | |
| tree | d37c47bf3ccb308f7a2959be0c2ef9c0e7ec9575 /src/lib/video_content.cc | |
| parent | c3da7c64f01420447dbab7f5c2ea42ff1b911cc5 (diff) | |
Various joining fixes.
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index ca4ed8a9f..0a19ffd69 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -101,10 +101,11 @@ VideoContent::VideoContent (shared_ptr<const Film> f, shared_ptr<const cxml::Nod VideoContent::VideoContent (shared_ptr<const Film> f, vector<shared_ptr<Content> > c) : Content (f, c) + , _video_length (0) { shared_ptr<VideoContent> ref = dynamic_pointer_cast<VideoContent> (c[0]); assert (ref); - + for (size_t i = 0; i < c.size(); ++i) { shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c[i]); @@ -131,6 +132,8 @@ VideoContent::VideoContent (shared_ptr<const Film> f, vector<shared_ptr<Content> if (vc->colour_conversion() != ref->colour_conversion()) { throw JoinError (_("Content to be joined must have the same colour conversion.")); } + + _video_length += vc->video_length (); } _video_size = ref->video_size (); |
