projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ef3f294
)
Don't create decoders if they are not necessary.
author
Carl Hetherington
<cth@carlh.net>
Mon, 3 Jul 2017 12:09:48 +0000
(13:09 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 3 Jul 2017 12:09:48 +0000
(13:09 +0100)
src/lib/dcp_decoder.cc
patch
|
blob
|
history
diff --git
a/src/lib/dcp_decoder.cc
b/src/lib/dcp_decoder.cc
index 0b99e8dd08f36f42d60da9e6559241db00b32411..c7294bda75dada03fa9f203597f33b0b35d4e231 100644
(file)
--- a/
src/lib/dcp_decoder.cc
+++ b/
src/lib/dcp_decoder.cc
@@
-54,9
+54,12
@@
DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log)
, _decode_referenced (false)
{
video.reset (new VideoDecoder (this, c, log));
, _decode_referenced (false)
{
video.reset (new VideoDecoder (this, c, log));
- audio.reset (new AudioDecoder (this, c->audio, log));
-
- subtitle.reset (new SubtitleDecoder (this, c->subtitle, log));
+ if (c->audio) {
+ audio.reset (new AudioDecoder (this, c->audio, log));
+ }
+ if (c->subtitle) {
+ subtitle.reset (new SubtitleDecoder (this, c->subtitle, log));
+ }
shared_ptr<dcp::CPL> cpl;
BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpls ()) {
shared_ptr<dcp::CPL> cpl;
BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpls ()) {