[Bug 795021] Reduce amount of memory allocations when payloading fixed-size audio buffers

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Apr 19 16:46:55 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=795021

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #370569|none                        |reviewed
             status|                            |

--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 370569:
 --> (https://bugzilla.gnome.org/review?bug=795021&attachment=370569)

::: gst-libs/gst/rtp/gstrtpbaseaudiopayload.c
@@ +96,3 @@
+gst_rtp_buffer_pool_dispose (GObject * object)
+{
+  G_OBJECT_CLASS (pool_parent_class)->dispose (object);

This is useless

@@ +133,3 @@
+
+  size = gst_buffer_get_sizes (buffer, &offset, NULL);
+  gst_buffer_resize (buffer, offset * -1, size + offset);

This needs a comment, why the -1 :) We should probably also check here if the
offset is as expected or that we can reset the buffer correctly?

@@ +1000,3 @@
+    return FALSE;
+
+  if (gst_query_get_n_allocation_pools (query) == 0) {

Why do we only add it if there is none yet? Should be safe to always add it

@@ +1008,3 @@
+
+    structure = gst_buffer_pool_get_config (self->priv->pool);
+    gst_buffer_pool_config_set_params (structure, caps, size, 0, 0);

Are all these things not usually set by whoever did the query to configure the
buffer pool? That code might override the size and stuff

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list