mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-02 17:53:48 +00:00
rtpac3depay2: fix handling of non-fragmented payloads
The frames of a non-fragmented payload would contain an extra two bytes before the frame sync and then missing two bytes at the end which which would cause decoding errors on the last block and/or frame crc check failures. This happened because we didn't take into account the 2-byte packet payload header when creating output sub-buffers, as the offsets we were using were in relation to the payload data after the headers. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/645 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2044>
This commit is contained in:
parent
cf40739da9
commit
5ccef7a453
1 changed files with 2 additions and 1 deletions
|
@ -346,8 +346,9 @@ impl RtpBaseDepay2Impl for RtpAc3Depay {
|
|||
|
||||
gst::trace!(CAT, imp = self, "Getting frame @ {offset}+{frame_len}");
|
||||
|
||||
// The packet has a 2-byte payload header that we need to skip here too
|
||||
let mut outbuf =
|
||||
packet.payload_subbuffer_from_offset_with_length(offset, frame_len);
|
||||
packet.payload_subbuffer_from_offset_with_length(2 + offset, frame_len);
|
||||
|
||||
let outbuf_ref = outbuf.get_mut().unwrap();
|
||||
|
||||
|
|
Loading…
Reference in a new issue