summaryrefslogtreecommitdiffstats
path: root/gst/rtp
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtpvorbispay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c
index 4e3820e6..dcf282a5 100644
--- a/gst/rtp/gstrtpvorbispay.c
+++ b/gst/rtp/gstrtpvorbispay.c
@@ -338,6 +338,7 @@ gst_rtp_vorbis_pay_finish_headers (GstBaseRTPPayload * basepayload)
for (walk = rtpvorbispay->headers; walk; walk = g_list_next (walk)) {
GstBuffer *buf = GST_BUFFER_CAST (walk->data);
guint bsize, size, temp;
+ guint flag;
/* only need to store the length when it's not the last header */
if (!g_list_next (walk))
@@ -355,10 +356,12 @@ gst_rtp_vorbis_pay_finish_headers (GstBaseRTPPayload * basepayload)
bsize = GST_BUFFER_SIZE (buf);
/* write the size backwards */
+ flag = 0;
while (size) {
size--;
- data[size] = bsize & 0x7f;
+ data[size] = (bsize & 0x7f) | flag;
bsize >>= 7;
+ flag = 0x80; /* Flag bit on all bytes of the length except the last */
}
data += temp;
}