summaryrefslogtreecommitdiff
path: root/libavformat/rtp_aac.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2009-02-05 14:53:25 +0000
committerLuca Abeni <lucabe72@email.it>2009-02-05 14:53:25 +0000
commit21da81d7844237609bba1f02cec8eff936055f4d (patch)
tree15cbcbcbad1cf1f550a891f5b779cd4e2000d805 /libavformat/rtp_aac.c
parent468d298d0c509c58d603cbe50abaa13efb418278 (diff)
Introduce a new num_frames field in RTPDemuxContext so that rtp_aac.c
does not need to abuse read_buf_index Originally committed as revision 17004 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtp_aac.c')
-rw-r--r--libavformat/rtp_aac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/rtp_aac.c b/libavformat/rtp_aac.c
index e54ff3fca0..71ca9c6617 100644
--- a/libavformat/rtp_aac.c
+++ b/libavformat/rtp_aac.c
@@ -40,8 +40,8 @@ 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->read_buf_index == MAX_FRAMES_PER_PACKET) || (len && (len + size) > max_packet_size)) {
- int au_size = s->read_buf_index * 2;
+ if ((s->num_frames == MAX_FRAMES_PER_PACKET) || (len && (len + size) > max_packet_size)) {
+ int au_size = s->num_frames * 2;
p = s->buf + MAX_AU_HEADERS_SIZE - au_size - 2;
if (p != s->buf) {
@@ -53,15 +53,15 @@ void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
ff_rtp_send_data(s1, p, s->buf_ptr - p, 1);
- s->read_buf_index = 0;
+ s->num_frames = 0;
}
- if (s->read_buf_index == 0) {
+ if (s->num_frames == 0) {
s->buf_ptr = s->buf + MAX_AU_HEADERS_SIZE;
s->timestamp = s->cur_timestamp;
}
if (size < max_packet_size) {
- p = s->buf + s->read_buf_index++ * 2 + 2;
+ p = s->buf + s->num_frames++ * 2 + 2;
*p++ = size >> 5;
*p = (size & 0x1F) << 3;
memcpy(s->buf_ptr, buff, size);