summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2015-06-01 19:42:49 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2015-06-01 19:42:49 -0400
commit45ef27aa4630afc91fee625310862e2c5cdc879d (patch)
treef46085e8a50cc2b084c6ce00083c87d0610acf69 /gst
parent10319757b46ca6de28c7bc028261d884abcfb650 (diff)
downloadgstreamer-plugins-bad-45ef27aa4630afc91fee625310862e2c5cdc879d.tar.gz
audiointerleave: Use the channel count from the set caps
This is the same number that was used to allocate the buffer
Diffstat (limited to 'gst')
-rw-r--r--gst/audiomixer/gstaudiointerleave.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/audiomixer/gstaudiointerleave.c b/gst/audiomixer/gstaudiointerleave.c
index fc984298e..5b55f301f 100644
--- a/gst/audiomixer/gstaudiointerleave.c
+++ b/gst/audiomixer/gstaudiointerleave.c
@@ -822,24 +822,25 @@ gst_audio_interleave_aggregate_one_buffer (GstAudioAggregator * aagg,
GstAudioInterleavePad *pad = GST_AUDIO_INTERLEAVE_PAD (aaggpad);
GstMapInfo inmap;
GstMapInfo outmap;
- gint out_width, in_bpf, out_bpf;
+ gint out_width, in_bpf, out_bpf, out_channels;
guint8 *outdata;
out_width = GST_AUDIO_INFO_WIDTH (&aagg->info) / 8;
in_bpf = GST_AUDIO_INFO_BPF (&aaggpad->info);
out_bpf = GST_AUDIO_INFO_BPF (&aagg->info);
+ out_channels = GST_AUDIO_INFO_CHANNELS (&aagg->info);
gst_buffer_map (outbuf, &outmap, GST_MAP_READWRITE);
gst_buffer_map (inbuf, &inmap, GST_MAP_READ);
GST_LOG_OBJECT (pad, "interleaves %u frames on channel %d/%d at offset %u"
- " from offset %u", num_frames, pad->channel, self->channels,
+ " from offset %u", num_frames, pad->channel, out_channels,
out_offset * out_bpf, in_offset * in_bpf);
outdata = outmap.data + (out_offset * out_bpf) +
(out_width * self->default_channels_ordering_map[pad->channel]);
- self->func (outdata, inmap.data + (in_offset * in_bpf), self->channels,
+ self->func (outdata, inmap.data + (in_offset * in_bpf), out_channels,
num_frames);