rtpjitterbuffer: fix race when updating the next_seqnum
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 30 Sep 2013 10:31:00 +0000 (12:31 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 30 Sep 2013 10:31:00 +0000 (12:31 +0200)
commit00056965e88a91492bd156d21dae390e4e9f97fd
treee833853c4dbe601a5df3c2119fde039a49ab8cc0
parentfde438791e39c362668dff01854429f9802e642e
rtpjitterbuffer: fix race when updating the next_seqnum

If we were not waiting for the missing seqnum when we insert the lost packet
event in the jitterbuffer, we end up not updating the next_seqnum and wait
forever for the lost packets to arrive. Instead, keep track of the amount of
packets contained by the jitterbuffer item and update the next expected
seqnum only after pushing the buffer/event. This makes sure we correctly handle
GAPS in the sequence numbers.
gst/rtpmanager/gstrtpjitterbuffer.c
gst/rtpmanager/rtpjitterbuffer.h