summaryrefslogtreecommitdiff
path: root/gst-libs/gst/rtp/gstrtpbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/rtp/gstrtpbuffer.c')
-rw-r--r--gst-libs/gst/rtp/gstrtpbuffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst-libs/gst/rtp/gstrtpbuffer.c b/gst-libs/gst/rtp/gstrtpbuffer.c
index a61051e81..d4c2edfe8 100644
--- a/gst-libs/gst/rtp/gstrtpbuffer.c
+++ b/gst-libs/gst/rtp/gstrtpbuffer.c
@@ -399,8 +399,9 @@ gst_rtp_buffer_map (GstBuffer * buffer, GstMapFlags flags, GstRTPBuffer * rtp)
rtp->size[1] = 0;
}
- /* check for padding */
- if (data[0] & 0x20) {
+ /* check for padding unless flags says to skip */
+ if ((data[0] & 0x20) != 0 &&
+ (flags & GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING) == 0) {
/* find memory for the padding bits */
if (!gst_buffer_find_memory (buffer, bufsize - 1, 1, &idx, &length, &skip))
goto wrong_length;