rtprtxsend: fix data locking when creating rtx packets
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 14 Jan 2014 12:01:41 +0000 (13:01 +0100)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 15 Jan 2014 09:13:11 +0000 (10:13 +0100)
commit55746eaa4c96e8652d3a78b49848365c6a28f359
treed78222ebe3f8c8099d1ec1fc482286e8ec37cf45
parent3d9ca102c9c06b72c8b2805754edb51e3e3e9fdf
rtprtxsend: fix data locking when creating rtx packets

This patch moves the creation of rtx packets to be done early,
in the src_event() function, when they are requested. The purpose
is to run gst_rtp_rtx_buffer_new() with the object locked to
protect internal data, because if it is done at the pushing stage,
we would have to lock and unlock multiple times in a row while we
are pushing the rtx buffers.

Previously there was no locking at all, which was terribly wrong.
gst/rtpmanager/gstrtprtxsend.c