summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gst/rtp/gstrtptheorapay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c
index 183d611f..890eddc4 100644
--- a/gst/rtp/gstrtptheorapay.c
+++ b/gst/rtp/gstrtptheorapay.c
@@ -353,6 +353,7 @@ gst_rtp_theora_pay_finish_headers (GstBaseRTPPayload * basepayload)
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))
@@ -370,10 +371,12 @@ gst_rtp_theora_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;
}
data += temp;
}