summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel París Díaz <mparisdiaz@gmail.com>2015-10-16 00:23:56 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-10-16 09:17:18 +0300
commitf19a789b685e9fb836275d7323d4dea7004084c2 (patch)
tree110f14611d3fa2b5e088cf6f188e8fe8741344c4
parentf441b9d5d2960e16072fabe0c434a087cbbb0aa5 (diff)
downloadgstreamer-plugins-bad-f19a789b685e9fb836275d7323d4dea7004084c2.tar.gz
srtpdec: skip padding when mapping RTP packets
https://bugzilla.gnome.org/show_bug.cgi?id=756653
-rw-r--r--ext/srtp/gstsrtpdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/srtp/gstsrtpdec.c b/ext/srtp/gstsrtpdec.c
index 2b814a4aa..7ca9afb0d 100644
--- a/ext/srtp/gstsrtpdec.c
+++ b/ext/srtp/gstsrtpdec.c
@@ -625,7 +625,8 @@ validate_buffer (GstSrtpDec * filter, GstBuffer * buf, guint32 * ssrc,
GstSrtpDecSsrcStream *stream = NULL;
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
- if (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf)) {
+ if (gst_rtp_buffer_map (buf,
+ GST_MAP_READ | GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING, &rtpbuf)) {
if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
|| gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
*ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
@@ -1124,7 +1125,8 @@ unprotect:
guint16 seqnum = 0;
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
- gst_rtp_buffer_map (buf, GST_MAP_READ, &rtpbuf);
+ gst_rtp_buffer_map (buf,
+ GST_MAP_READ | GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING, &rtpbuf);
seqnum = gst_rtp_buffer_get_seq (&rtpbuf);
gst_rtp_buffer_unmap (&rtpbuf);