rtpsession: Avoid unnecessary copy of stats structure
authorMikhail Fludkov <misha@pexip.com>
Thu, 6 Oct 2016 14:08:38 +0000 (16:08 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 15 May 2018 10:33:01 +0000 (11:33 +0100)
commit40eb4625911c98a9bec1d7712c217036a5a795ba
tree12ccc31a2c5dc7a09fef1bf4eee28fc729a268e6
parentd5d6e6cfdd4030052bc0b8dfc85739614a80a714
rtpsession: Avoid unnecessary copy of stats structure

The code before copied GstStructure twice. The first time inside
gst_value_set_structure and the second time in g_value_array_append.
Optimized version does no copies, just transfers ownership to
GValueArray. It takes advantage of the fact that array has already
enough elements preallocated and the memory is zero initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=795139
gst/rtpmanager/rtpsession.c