rtph264depay: Warn when max SPS/PPS are collected in AVC mode.
authorJan Schmidt <jan@centricular.com>
Fri, 16 Oct 2020 13:05:15 +0000 (00:05 +1100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 29 Oct 2020 14:09:21 +0000 (14:09 +0000)
commit2623404744448cf72735afac42fa40503951b648
tree890a105cc8ad4a503ce199fa80cf720b19b2def6
parent63c7a9ae430db991746dc4b13d26d4f7945b2dc1
rtph264depay: Warn when max SPS/PPS are collected in AVC mode.

The AVC codec_data has a flaw that it can only accomodate
31 SPS headers, even though H.264 can have 32, and 255 PPS,
when there can be 256 in H.264. When streaming RTP some
clients like to cycle through SPS/PPS ids when changing
configuration and can eventually accumulate a full set.

In that case, we have no choice but to discard one (oldest)
entry, or else the count written into the codec_data is wrong
and downstream decoding failures ensue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/775>
gst/rtp/gstrtph264depay.c