Handle multiple audio streams in a single piece of content
[dcpomatic.git] / src / lib / dcp_decoder.cc
index 3bfbd7720c9e04cf99b951db455e306bd2be3cb9..0411ad94183d8818df84adcc5d23ac5ec1d3b5f8 100644 (file)
@@ -89,7 +89,7 @@ DCPDecoder::pass (PassReason)
                shared_ptr<const dcp::SoundFrame> sf = (*_reel)->main_sound()->mxf()->get_frame (entry_point + frame);
                uint8_t const * from = sf->data ();
 
-               int const channels = _dcp_content->audio_channels ();
+               int const channels = _dcp_content->audio_stream()->channels ();
                int const frames = sf->size() / (3 * channels);
                shared_ptr<AudioBuffers> data (new AudioBuffers (channels, frames));
                for (int i = 0; i < frames; ++i) {
@@ -99,7 +99,7 @@ DCPDecoder::pass (PassReason)
                        }
                }
 
-               audio (data, _next);
+               audio (_dcp_content->audio_stream(), data, _next);
        }
 
        /* XXX: subtitle */