diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 19:07:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 19:07:51 +0000 |
| commit | 7d897b0c9e4a9d479effb89dc9b386abdb9ad212 (patch) | |
| tree | b379392f38f0a8f2ce4400d70ffbe4aa093d24a3 /src | |
| parent | 38ab691952b83088fe7f5aa19d3ad2646221ccbf (diff) | |
Fix minor infringement of XML wrt CPL reel order.
Diffstat (limited to 'src')
| -rw-r--r-- | src/reel.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/reel.cc b/src/reel.cc index 51aa560c..b729695c 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -21,6 +21,8 @@ #include "reel.h" #include "util.h" #include "picture_asset.h" +#include "mono_picture_asset.h" +#include "stereo_picture_asset.h" #include "sound_asset.h" #include "subtitle_asset.h" #include "kdm.h" @@ -29,6 +31,7 @@ using std::string; using std::list; using std::cout; using boost::shared_ptr; +using boost::dynamic_pointer_cast; using namespace libdcp; void @@ -38,7 +41,8 @@ Reel::write_to_cpl (xmlpp::Element* node, bool interop) const reel->add_child("Id")->add_child_text ("urn:uuid:" + make_uuid()); xmlpp::Element* asset_list = reel->add_child ("AssetList"); - if (_main_picture) { + if (_main_picture && dynamic_pointer_cast<MonoPictureAsset> (_main_picture)) { + /* Mono pictures come before other stuff... */ _main_picture->write_to_cpl (asset_list, interop); } @@ -49,6 +53,11 @@ Reel::write_to_cpl (xmlpp::Element* node, bool interop) const if (_main_subtitle) { _main_subtitle->write_to_cpl (asset_list, interop); } + + if (_main_picture && dynamic_pointer_cast<StereoPictureAsset> (_main_picture)) { + /* ... but stereo pictures must come after */ + _main_picture->write_to_cpl (asset_list, interop); + } } bool |
