summaryrefslogtreecommitdiff
path: root/src/lib/dcp_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-04-20 00:29:55 +0100
committerCarl Hetherington <cth@carlh.net>2019-04-20 00:29:55 +0100
commit5fd2395577ff5eedca060e8b333129ad6de9aa27 (patch)
tree12da92f8ca2122376e3310e3dd444f3dc810a574 /src/lib/dcp_decoder.cc
parent75ef09f7ca0838357b55399916719655905e218a (diff)
Don't set up decoder parts for DCPs unless they can be playedv2.13.149
(i.e. are not encrypted and not missing assets). Fixes full audio buffers on locates with large encrypted DCPs and no KDMs; in these cases silent audio is created by the fill_audio() at the bottom of Player::pass() but no video is created by anybody.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
-rw-r--r--src/lib/dcp_decoder.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc
index 85dd28006..8179ef009 100644
--- a/src/lib/dcp_decoder.cc
+++ b/src/lib/dcp_decoder.cc
@@ -60,15 +60,17 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
, Decoder (film)
, _decode_referenced (false)
{
- if (c->video) {
- video.reset (new VideoDecoder (this, c));
- }
- if (c->audio) {
- audio.reset (new AudioDecoder (this, c->audio, fast));
- }
- BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
- /* XXX: this time here should be the time of the first subtitle, not 0 */
- text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, ContentTime())));
+ if (c->can_be_played()) {
+ if (c->video) {
+ video.reset (new VideoDecoder (this, c));
+ }
+ if (c->audio) {
+ audio.reset (new AudioDecoder (this, c->audio, fast));
+ }
+ BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
+ /* XXX: this time here should be the time of the first subtitle, not 0 */
+ text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, ContentTime())));
+ }
}
list<shared_ptr<dcp::CPL> > cpl_list = cpls ();