srtpdec: skip padding when mapping RTP packets
https://bugzilla.gnome.org/show_bug.cgi?id=756653
This commit is contained in:
parent
f441b9d5d2
commit
f19a789b68
@ -625,7 +625,8 @@ validate_buffer (GstSrtpDec * filter, GstBuffer * buf, guint32 * ssrc,
|
|||||||
GstSrtpDecSsrcStream *stream = NULL;
|
GstSrtpDecSsrcStream *stream = NULL;
|
||||||
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
|
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
|
if (gst_rtp_buffer_get_payload_type (&rtpbuf) < 64
|
||||||
|| gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
|
|| gst_rtp_buffer_get_payload_type (&rtpbuf) > 80) {
|
||||||
*ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
|
*ssrc = gst_rtp_buffer_get_ssrc (&rtpbuf);
|
||||||
@ -1124,7 +1125,8 @@ unprotect:
|
|||||||
guint16 seqnum = 0;
|
guint16 seqnum = 0;
|
||||||
GstRTPBuffer rtpbuf = GST_RTP_BUFFER_INIT;
|
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);
|
seqnum = gst_rtp_buffer_get_seq (&rtpbuf);
|
||||||
gst_rtp_buffer_unmap (&rtpbuf);
|
gst_rtp_buffer_unmap (&rtpbuf);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user