summaryrefslogtreecommitdiff
path: root/libavformat/rtp_aac.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2009-05-29 13:46:46 +0000
committerLuca Abeni <lucabe72@email.it>2009-05-29 13:46:46 +0000
commit6f62e2c72d4ab9f645800e35214dbb9d45bb5494 (patch)
treed8cd999c1b6a82f1d6fbc5480e252cb8b86a2625 /libavformat/rtp_aac.c
parent8c57662001c25e65697b33654536631fa0ac49c8 (diff)
Correctly set the "AU size" field in the payload header for
fragmented AAC frames Originally committed as revision 18984 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtp_aac.c')
-rw-r--r--libavformat/rtp_aac.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/rtp_aac.c b/libavformat/rtp_aac.c
index b597bb16b4..e19b28697e 100644
--- a/libavformat/rtp_aac.c
+++ b/libavformat/rtp_aac.c
@@ -66,14 +66,16 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
memcpy(s->buf_ptr, buff, size);
s->buf_ptr += size;
} else {
+ int au_size = size;
+
max_packet_size = s->max_payload_size - 4;
p = s->buf;
p[0] = 0;
p[1] = 16;
while (size > 0) {
len = FFMIN(size, max_packet_size);
- p[2] = len >> 5;
- p[3] = (size & 0x1F) << 3;
+ p[2] = au_size >> 5;
+ p[3] = (au_size & 0x1F) << 3;
memcpy(p + 4, buff, len);
ff_rtp_send_data(s1, p, len + 4, len == size);
size -= len;