rtpsource: fix receiver source stats to consider previously queued packets
authorAntonio Ospite <antonio.ospite@collabora.com>
Thu, 4 Apr 2019 11:17:34 +0000 (13:17 +0200)
committerAntonio Ospite <antonio.ospite@collabora.com>
Fri, 2 Aug 2019 15:22:51 +0000 (17:22 +0200)
commitae48646d8eda08ac21aaa0a7826043b1bc875615
treed7a586c3b3032484f850dca63f5c349b071b19b5
parentcf0ffd86930d02e13a9a8d8770b40e0be4bec4d9
rtpsource: fix receiver source stats to consider previously queued packets

When it is not clear yet if a packet relative to a source should be
pushed, the packet is put into a queue, this happens in two cases:

  - the source is still in probation;
  - there is a large jump in seqnum, and it is not clear what
    the cause is, future packets will help making a guess.

In either case stats about received packets are not updated at all; and
even if they were, when init_seq() is called it resets all receiver
stats, effectively loosing any possible stat about previously received
packets.

Fix this by taking into account the queued packets and update the stats
when calling init_seq().
gst/rtpmanager/rtpsource.c