summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>2018-12-05 10:10:39 +0100
committerTim-Philipp Müller <tim@centricular.com>2019-05-02 11:47:28 +0100
commitf39e86badc93e6bed17e8d0f9fdbc52c106b4a2f (patch)
treee7c3bf32bd43bf52a3503f09a72e5fd986801e63
parentd8e38ee182df00a29d04645ed9658f0a167a8b4a (diff)
downloadgstreamer-plugins-bad-f39e86badc93e6bed17e8d0f9fdbc52c106b4a2f.tar.gz
fdkaacdec: Use WAV channel mapping instead of interleave setting
The latter is going away in libfdk-aac 2.0.0. Instead, MPEG-style output is always non-interleaved and WAV-style output is always interleaved. Earlier libfdk-aac also defaults interleaving accordingly. Since our reordering looks at the associated PCE indices instead of the actual channel order, we're agnostic to the mapping. For https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/825
-rw-r--r--ext/fdkaac/gstfdkaacdec.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/fdkaac/gstfdkaacdec.c b/ext/fdkaac/gstfdkaacdec.c
index c27183752..f5136b334 100644
--- a/ext/fdkaac/gstfdkaacdec.c
+++ b/ext/fdkaac/gstfdkaacdec.c
@@ -151,17 +151,13 @@ gst_fdkaacdec_set_format (GstAudioDecoder * dec, GstCaps * caps)
gst_buffer_unref (codec_data);
}
+ /* Choose WAV channel mapping to get interleaving even with libfdk-aac 2.0.0
+ * The pChannelIndices retain the indices from the standard MPEG mapping so
+ * we're agnostic to the actual order. */
if ((err =
aacDecoder_SetParam (self->dec, AAC_PCM_OUTPUT_CHANNEL_MAPPING,
- 0)) != AAC_DEC_OK) {
- GST_ERROR_OBJECT (self, "Failed to set output channel mapping: %d", err);
- return FALSE;
- }
-
- if ((err =
- aacDecoder_SetParam (self->dec, AAC_PCM_OUTPUT_INTERLEAVED,
1)) != AAC_DEC_OK) {
- GST_ERROR_OBJECT (self, "Failed to set interleaved output: %d", err);
+ GST_ERROR_OBJECT (self, "Failed to set output channel mapping: %d", err);
return FALSE;
}