mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
rtptheorapay: fix length encoding in packed headers.
As for vorbis payloader; this by inspection had the same bug.
This commit is contained in:
parent
5f9d9e2243
commit
85d7fb0599
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue