rtph265pay: don't add trailing zeros to VPS/PPS/SPS
authorTim-Philipp Müller <tim@centricular.com>
Tue, 8 Aug 2017 17:58:11 +0000 (18:58 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 23 Nov 2017 08:36:15 +0000 (09:36 +0100)
commitb84201bf8163bd58cb9611616732017b7487242a
tree5f4fa8bada707bd086af81af2fe156e2595894a6
parent311b9895ba10d6baf1a1f9f6fa61e47b79f6684e
rtph265pay: don't add trailing zeros to VPS/PPS/SPS

This would happen if input is byte-stream with four-byte
sync markers instead of three-byte ones. The code that
scans for sync markers will place the start of the NALU
on the third-last byte of the NALU sync marker, which
means that any additional zeros may be counted as belonging
to the previous NALU instead of being part of the next sync
marker. Fix that so we don't send VPS/SPS/PPS with trailing
zeros in this case.

See https://bugzilla.gnome.org/show_bug.cgi?id=732758
gst/rtp/gstrtph265pay.c