Fix setup of resampler channel counts.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Apr 2013 11:28:15 +0000 (12:28 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Apr 2013 11:28:15 +0000 (12:28 +0100)
src/lib/encoder.cc

index 3201e6ecb5bd689cd04a4b81013c17a466791357..f56440dd7c1026bfb97f564410bb8c36512beac3 100644 (file)
@@ -93,13 +93,13 @@ Encoder::process_begin ()
                   decide if rematrixing is needed.  It won't be, since
                   input and output layouts are the same.
                */
-                  
+
                _swr_context = swr_alloc_set_opts (
                        0,
-                       av_get_default_channel_layout (_film->audio_channels ()),
+                       av_get_default_channel_layout (_film->audio_mapping().dcp_channels ()),
                        AV_SAMPLE_FMT_FLTP,
                        _film->target_audio_sample_rate(),
-                       av_get_default_channel_layout (_film->audio_channels ()),
+                       av_get_default_channel_layout (_film->audio_mapping().dcp_channels ()),
                        AV_SAMPLE_FMT_FLTP,
                        _film->audio_frame_rate(),
                        0, 0