Pad silence for things that already have at least some audio.
[dcpomatic.git] / src / lib / encoder.cc
index 2c989452d012b7773cda11f97c91ee5341e3e0d4..6a99132fdfffc614233b4b8611fc37f768785438 100644 (file)
@@ -433,10 +433,10 @@ Encoder::encoder_thread (ServerDescription* server)
 void
 Encoder::write_audio (shared_ptr<const AudioBuffers> data)
 {
-       AudioMapping m (_film->audio_channels ());
+       AudioMapping m (_film);
        if (m.dcp_channels() != _film->audio_channels()) {
 
-               /* Remap (currently just for mono -> 5.1) */
+               /* Remap and pad with silence */
 
                shared_ptr<AudioBuffers> b (new AudioBuffers (m.dcp_channels(), data->frames ()));
                for (int i = 0; i < m.dcp_channels(); ++i) {