jitterbuffer: improve SR packet handling
authorWim Taymans <wtaymans@redhat.com>
Wed, 25 Jun 2014 12:34:21 +0000 (14:34 +0200)
committerWim Taymans <wtaymans@redhat.com>
Wed, 25 Jun 2014 14:14:46 +0000 (16:14 +0200)
commitca9cfd40dd63e44d7fec8ac2735457dd92949d02
tree034159d7130d494d5fa1775bbf12d87a9dce6f6f
parentf7aeb57858aa20757076aa2680cf1f780bf047ef
jitterbuffer: improve SR packet handling

Implement 3 different cases for handling the SR:

 1) we don't have enough timing information to handle the SR packet and
    we need to wait a little for more RTP packets. In that case we keep
    the SR packet around and retry when we get an RTP packet in the
    chain function.

 2) the SR packet has a too old timestamp and should be discarded. It is
    labeled invalid and the last_sr is cleared.

 3) the SR packet is ok and there is enough timing information, proceed
    with processing the SR packet.

Before this patch, case 2) and 1) were handled in the same way,
resulting that SR packets with too old timestamps were checked over and
over again for each RTP packet.
gst/rtpmanager/gstrtpjitterbuffer.c