From: Carl Hetherington Date: Sat, 16 Apr 2022 21:57:19 +0000 (+0200) Subject: Replace encrypted content with black if we have no key (#2234). X-Git-Tag: v2.16.10~61 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=d1b4dbb793e2850d032ce3c91f0c91d045ae19dc Replace encrypted content with black if we have no key (#2234). --- diff --git a/src/lib/content.h b/src/lib/content.h index 7fad2ff79..7c02ee0e3 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -192,6 +192,10 @@ public: std::string calculate_digest () const; + virtual bool can_be_played () const { + return true; + } + /* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */ boost::signals2::signal, int, bool)> Change; diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index d57c0059c..55773b944 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -92,7 +92,7 @@ public: return _kdm; } - bool can_be_played () const; + bool can_be_played () const override; bool needs_kdm () const; bool needs_assets () const; diff --git a/src/lib/player.cc b/src/lib/player.cc index 12a53bc63..58ea4f2de 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -147,7 +147,7 @@ Player::setup_pieces () bool have_video (shared_ptr content) { - return static_cast(content->video) && content->video->use(); + return static_cast(content->video) && content->video->use() && content->can_be_played(); }