From d2ce53b786957df07bce4e62b140f6ad53932145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 9 Apr 2009 21:37:11 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20two=20checks=20in=20the=20AAC=20packetise?= =?UTF-8?q?r,=20which=20were=20too=20conservative=20Patch=20by=20Martin=20?= =?UTF-8?q?Storsj=C3=B6=20(martin=20AT=20martin=20DOT=20st)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Originally committed as revision 18400 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtp_aac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtp_aac.c b/libavformat/rtp_aac.c index bfff56a105..1a9265b1de 100644 --- a/libavformat/rtp_aac.c +++ b/libavformat/rtp_aac.c @@ -39,7 +39,7 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size) /* test if the packet must be sent */ len = (s->buf_ptr - s->buf); - if ((s->num_frames == MAX_FRAMES_PER_PACKET) || (len && (len + size) > max_packet_size)) { + if ((s->num_frames == MAX_FRAMES_PER_PACKET) || (len && (len + size) > s->max_payload_size)) { int au_size = s->num_frames * 2; p = s->buf + MAX_AU_HEADERS_SIZE - au_size - 2; @@ -59,7 +59,7 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size) s->timestamp = s->cur_timestamp; } - if (size < max_packet_size) { + if (size <= max_packet_size) { p = s->buf + s->num_frames++ * 2 + 2; *p++ = size >> 5; *p = (size & 0x1F) << 3; -- GitLab