summaryrefslogtreecommitdiff
path: root/gst-libs/gst/audio
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2017-05-20 17:59:19 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.com>2017-05-21 13:24:29 +0200
commitea26b9aa379d1b2cf4834f65733f4208531c1602 (patch)
tree23851987cc1692e5ed3d39e7082b8b7d40137901 /gst-libs/gst/audio
parent9897c5c80deae8d8d62ac302c58ee094d450a250 (diff)
downloadgstreamer-plugins-bad-ea26b9aa379d1b2cf4834f65733f4208531c1602.tar.gz
audioaggregator: Use downstream allocator and params if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
Diffstat (limited to 'gst-libs/gst/audio')
-rw-r--r--gst-libs/gst/audio/gstaudioaggregator.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gst-libs/gst/audio/gstaudioaggregator.c b/gst-libs/gst/audio/gstaudioaggregator.c
index f5c6c2be1..d6833319e 100644
--- a/gst-libs/gst/audio/gstaudioaggregator.c
+++ b/gst-libs/gst/audio/gstaudioaggregator.c
@@ -1024,10 +1024,19 @@ static GstBuffer *
gst_audio_aggregator_create_output_buffer (GstAudioAggregator * aagg,
guint num_frames)
{
- GstBuffer *outbuf = gst_buffer_new_allocate (NULL, num_frames *
- GST_AUDIO_INFO_BPF (&aagg->info), NULL);
+ GstAllocator *allocator;
+ GstAllocationParams params;
+ GstBuffer *outbuf;
GstMapInfo outmap;
+ gst_aggregator_get_allocator (GST_AGGREGATOR (aagg), &allocator, &params);
+
+ outbuf = gst_buffer_new_allocate (allocator, num_frames *
+ GST_AUDIO_INFO_BPF (&aagg->info), &params);
+
+ if (allocator)
+ gst_object_unref (allocator);
+
gst_buffer_map (outbuf, &outmap, GST_MAP_WRITE);
gst_audio_format_fill_silence (aagg->info.finfo, outmap.data, outmap.size);
gst_buffer_unmap (outbuf, &outmap);