summaryrefslogtreecommitdiff
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-08-27 13:46:52 (GMT)
committer Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2009-08-31 14:50:01 (GMT)
commitc9a434bbff4d9250a355a7d07b4c80b2d71debdb (patch) (side-by-side diff)
treecda252d9e545af07ce3adb8014f8909f2bbbffc2
parent30efa405f35c7bd299de8b457c8b622d37bb00f9 (diff)
downloadgst-plugins-good-c9a434bbff4d9250a355a7d07b4c80b2d71debdb.zip
gst-plugins-good-c9a434bbff4d9250a355a7d07b4c80b2d71debdb.tar.gz
rtpmp4gdepay: consider (optional) auxiliary data when parsing
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--gst/rtp/gstrtpmp4gdepay.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gst/rtp/gstrtpmp4gdepay.c b/gst/rtp/gstrtpmp4gdepay.c
index a4c8a4b..865e120 100644
--- a/gst/rtp/gstrtpmp4gdepay.c
+++ b/gst/rtp/gstrtpmp4gdepay.c
@@ -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;