mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
rtpmp4gdepay: consider (optional) auxiliary data when parsing
This commit is contained in:
parent
30efa405f3
commit
c9a434bbff
1 changed files with 17 additions and 0 deletions
|
@ -477,6 +477,23 @@ gst_rtp_mp4g_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
payload_AU = 2 + AU_headers_bytes;
|
||||
payload_AU_size = payload_len - AU_headers_bytes;
|
||||
|
||||
if (G_UNLIKELY (rtpmp4gdepay->auxiliarydatasizelength)) {
|
||||
gint aux_size;
|
||||
|
||||
/* point the bitstream parser to the first auxiliary data bit */
|
||||
gst_bs_parse_init (&bs, payload + AU_headers_bytes,
|
||||
payload_len - AU_headers_bytes);
|
||||
aux_size =
|
||||
gst_bs_parse_read (&bs, rtpmp4gdepay->auxiliarydatasizelength);
|
||||
/* convert to bytes */
|
||||
aux_size = (aux_size + 7) / 8;
|
||||
/* AU data then follows auxiliary data */
|
||||
if (payload_AU_size < aux_size)
|
||||
goto short_payload;
|
||||
payload_AU += aux_size;
|
||||
payload_AU_size -= aux_size;
|
||||
}
|
||||
|
||||
/* point the bitstream parser to the first AU header bit */
|
||||
gst_bs_parse_init (&bs, payload, payload_len);
|
||||
AU_index = AU_index_delta = 0;
|
||||
|
|
Loading…
Reference in a new issue