comparison rtp_aac.c @ 2551:be9b08eba612 libavformat

Support fragmentation for AAC frames
author lucabe
date Fri, 14 Sep 2007 09:00:31 +0000
parents e9c34ec665c6
children d751acab2622
comparison
equal deleted inserted replaced
2550:e9c34ec665c6 2551:be9b08eba612
65 *p++ = size >> 5; 65 *p++ = size >> 5;
66 *p = (size & 0x1F) << 3; 66 *p = (size & 0x1F) << 3;
67 memcpy(s->buf_ptr, buff, size); 67 memcpy(s->buf_ptr, buff, size);
68 s->buf_ptr += size; 68 s->buf_ptr += size;
69 } else { 69 } else {
70 av_log(s1, AV_LOG_ERROR, "Unsupported!\n"); 70 if (s->buf_ptr != s->buf + MAX_AU_HEADERS_SIZE) {
71 av_log(s1, AV_LOG_ERROR, "Strange...\n");
72 av_abort();
73 }
74 max_packet_size = s->max_payload_size - 4;
75 p = s->buf;
76 p[0] = 0;
77 p[1] = 16;
78 while (size > 0) {
79 len = FFMIN(size, max_packet_size);
80 p[2] = len >> 5;
81 p[3] = (size & 0x1F) << 3;
82 memcpy(p + 4, buff, len);
83 ff_rtp_send_data(s1, p, len + 4, len == size);
84 size -= len;
85 buff += len;
86 }
71 } 87 }
72 } 88 }