summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_aac.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2012-11-08 01:38:50 +0100
committerMartin Storsjö <martin@martin.st>2012-11-08 19:48:32 +0200
commite004d175fe2463af8242e390b15350f4745be7b4 (patch)
tree668b3f65e4bde44c4ae28891b0e030add3253bfc /libavformat/rtpenc_aac.c
parent6ca60d4ddd9b34b98b8570d440d79736d060f02a (diff)
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: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc_aac.c')
-rw-r--r--libavformat/rtpenc_aac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpenc_aac.c b/libavformat/rtpenc_aac.c
index 86318dfa6e..1b2fa0a78c 100644
--- a/libavformat/rtpenc_aac.c
+++ b/libavformat/rtpenc_aac.c
@@ -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);