Commit e004d175 authored by Luca Abeni's avatar Luca Abeni Committed by Martin Storsjö

rtpenc_aac: Fix calculation of the header size

Previously the high end byte was always set to zero. Also get
rid of an unnecessary multiplication (which in practice couldn't
overflow) before shifting.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 6ca60d4d
......@@ -47,8 +47,8 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
memmove(p + 2, s->buf + 2, au_size);
}
/* Write the AU header size */
p[0] = ((au_size * 8) & 0xFF) >> 8;
p[1] = (au_size * 8) & 0xFF;
p[0] = au_size >> 5;
p[1] = (au_size & 0x1F) << 3;
ff_rtp_send_data(s1, p, s->buf_ptr - p, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment