summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-10 20:45:07 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-10 20:45:07 +0100
commit4dee3db5222be7972930dbc621e9ab15a81d33d2 (patch)
tree5d19e620d6d074bf174e4e05fe3028b8eef7047d /src/lib/encoder.cc
parent8f1c131a933e7695684e22eb82abba30fe119915 (diff)
Remove believed unnecessary audio channel layout stuff for resampler.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 46d11c556..b897c8a31 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -86,13 +86,20 @@ Encoder::process_begin ()
s << String::compose (N_("Will resample audio from %1 to %2"), _film->audio_frame_rate(), _film->target_audio_sample_rate());
_film->log()->log (s.str ());
- /* We will be using planar float data when we call the resampler */
+ /* We will be using planar float data when we call the
+ resampler. As far as I can see, the audio channel
+ layout is not necessary for our purposes; it seems
+ only to be used get the number of channels and
+ decide if rematrixing is needed. It won't be, since
+ input and output layouts are the same.
+ */
+
_swr_context = swr_alloc_set_opts (
0,
- _film->audio_channel_layout(),
+ av_get_default_channel_layout (_film->audio_channels ()),
AV_SAMPLE_FMT_FLTP,
_film->target_audio_sample_rate(),
- _film->audio_channel_layout(),
+ av_get_default_channel_layout (_film->audio_channels ()),
AV_SAMPLE_FMT_FLTP,
_film->audio_frame_rate(),
0, 0