summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
parent54b0288e0a590506a2defa249ff36cf4c92a9997 (diff)
Prevent assertion failure when using DCP content with no audio.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc5
1 files changed, 5 insertions, 0 deletions
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);