X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Freel_subtitle_asset.cc;h=a90513d5c1fed7aede33b306526a85bb181aa735;hb=1a1ad378a86e4546c746ac5b89377f50d8580c15;hp=75116b2b6782202a58497d990bc480d41fd0b034;hpb=f2f2a2afc393dcaee747b97173d71a622d05d910;p=libdcp.git diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc index 75116b2b..a90513d5 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_subtitle_asset.cc @@ -47,8 +47,8 @@ using boost::optional; using namespace dcp; ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) - : ReelAsset (asset, edit_rate, intrinsic_duration, entry_point) - , ReelMXF (dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) + : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) + , ReelMXF (asset, dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) { } @@ -76,7 +76,7 @@ ReelSubtitleAsset::key_type () const xmlpp::Node * ReelSubtitleAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const { - xmlpp::Node* asset = ReelAsset::write_to_cpl (node, standard); + xmlpp::Node* asset = write_to_cpl_base (node, standard, hash()); if (key_id ()) { /* Find */ @@ -86,3 +86,16 @@ ReelSubtitleAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const return asset; } + +bool +ReelSubtitleAsset::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const +{ + if (!asset_equals (other, opt, note)) { + return false; + } + if (!mxf_equals (other, opt, note)) { + return false; + } + + return true; +}