rtpgstdepay: Only store the current caps and drop old caps immediately
authorSebastian Dröge <sebastian@centricular.com>
Wed, 12 Jun 2019 11:57:24 +0000 (14:57 +0300)
committerSebastian Dröge <slomo@coaxion.net>
Tue, 18 Jun 2019 08:35:12 +0000 (08:35 +0000)
commit44a697deba829cb97c67829a666dd8b5078910b7
tree9922c946c84e575313e33afa4baf9202488b4dc0
parent53b3f2ddbbb65b119aa83fb6bedfbe3d98fd49b0
rtpgstdepay: Only store the current caps and drop old caps immediately

Otherwise it can happen that we already collected 7 caps, miss the 8th
caps packet (packet loss) and then re-use the 1st caps for the following
buffers instead of the 8th caps which will likely cause errors further
downstream unless both caps are accidentally the same.

Keeping old caps around does not seem to have any value other than
potentially causing errors. We would always receive new caps whenever
they change (even if they were previous ones) and it's very unlikely
that they happen to be exactly the same as the previous ones.

Also after having received new caps or a buffer with a next caps
version, no buffers with old caps version will arrive anymore.
gst/rtp/gstrtpgstdepay.c
gst/rtp/gstrtpgstdepay.h