diff options
author | Michael Smith <msmith@songbirdnest.com> | 2009-04-01 17:31:18 -0700 |
---|---|---|
committer | Michael Smith <msmith@songbirdnest.com> | 2009-04-01 17:31:18 -0700 |
commit | 85d7fb059929d6583a04e00d0df9c4234fba85be (patch) | |
tree | 9c32fc6413afe806f10b2b8558d0399edaa9e679 /gst/rtp/gstrtptheorapay.c | |
parent | 5f9d9e22431636de4c218cd0f0fbf5c4c7332f9c (diff) |
rtptheorapay: fix length encoding in packed headers.
As for vorbis payloader; this by inspection had the same bug.
Diffstat (limited to 'gst/rtp/gstrtptheorapay.c')
-rw-r--r-- | gst/rtp/gstrtptheorapay.c | 5 |
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; } |