summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-07-09 16:56:38 +0100
committerCarl Hetherington <cth@carlh.net>2015-07-09 16:56:38 +0100
commit60ce73a0b0f179520f9edee70c5b277ab3f48510 (patch)
tree67a9b02baf0a719ef62f46e7cf17d2a16e6eb2b5
parent54b0288e0a590506a2defa249ff36cf4c92a9997 (diff)
Prevent assertion failure when using DCP content with no audio.
-rw-r--r--ChangeLog2
-rw-r--r--src/lib/player.cc5
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 23563601d..514a1b009 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2015-07-09 c.hetherington <cth@carlh.net>
+ * Fix error when using DCP content with no audio channels.
+
* Stop Ctrl+A working when the content tab is not visible (#577).
2015-07-08 c.hetherington <cth@carlh.net>
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 1a008eebb..328920549 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -449,6 +449,11 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
BOOST_FOREACH (AudioStreamPtr j, content->audio_streams ()) {
+ if (j->channels() == 0) {
+ /* Some content (e.g. DCPs) can have streams with no channels */
+ continue;
+ }
+
/* Audio from this piece's decoder stream (which might be more or less than what we asked for) */
ContentAudio all = decoder->get_audio (j, content_frame, request_frames, accurate);