rtpsession: avoid buffer ref/unref pairs for CSRCs
authorAurelien Grimaud <gstelzz at yahoo dot fr>
Mon, 30 Nov 2009 14:59:50 +0000 (15:59 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 30 Nov 2009 14:59:50 +0000 (15:59 +0100)
commit07f27f0efd5a866721fd83c6873e7eacc989c0fe
tree0b2159e557554b5bc8c202a8f5f17c30883c191e
parent4519bdc9833dc6d59135ef57873f45c273aee7b2
rtpsession: avoid buffer ref/unref pairs for CSRCs

We ref the buffer before pushing it downstream in order to get the CSRCs of it
after pushing. This causes performance problems when downstream elements want to
change the metadata because the buffer needs to be subbuffered.

Instead, read and store the CSRCs of the buffer in an array before pushing it
and process the array after pushing the buffer. This allows us to remove the
ref/unref pair.

Fixes #603376
gst/rtpmanager/rtpsession.c