diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-14 23:59:16 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-14 23:59:16 +0100 |
| commit | 9486066c29b91a8d9ac25be1c596cad62387208f (patch) | |
| tree | 181a41967df7a2ccd41ab8ed14d6c99171850bdc /src/reel.cc | |
| parent | 563dbf02e9c7ab0066bcebbcde6c662df845695a (diff) | |
Support reading of encrypted subtitles.
Diffstat (limited to 'src/reel.cc')
| -rw-r--r-- | src/reel.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/reel.cc b/src/reel.cc index 78be2293..50c780f4 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -45,6 +45,7 @@ #include "decrypted_kdm_key.h" #include "decrypted_kdm.h" #include "interop_subtitle_asset.h" +#include "smpte_subtitle_asset.h" #include "reel_atmos_asset.h" #include <libxml++/nodes/element.h> @@ -184,6 +185,12 @@ Reel::add (DecryptedKDM const & kdm) if (_main_sound && i->id() == _main_sound->key_id()) { _main_sound->asset()->set_key (i->key ()); } + if (_main_subtitle && i->id() == _main_subtitle->key_id()) { + shared_ptr<SMPTESubtitleAsset> s = dynamic_pointer_cast<SMPTESubtitleAsset> (_main_subtitle->asset()); + if (s) { + s->set_key (i->key ()); + } + } if (_atmos && i->id() == _atmos->key_id()) { _atmos->asset()->set_key (i->key ()); } |
