31 const int max_au_headers_size = 2 + 2 *
s->max_frames_per_packet;
32 int len, max_packet_size =
s->max_payload_size - max_au_headers_size;
36 len = (
s->buf_ptr -
s->buf);
38 (
s->num_frames ==
s->max_frames_per_packet ||
39 (
len +
size) >
s->max_payload_size ||
42 int au_size =
s->num_frames * 2;
44 p =
s->buf + max_au_headers_size - au_size - 2;
46 memmove(p + 2,
s->buf + 2, au_size);
55 if (
s->num_frames == 0) {
56 s->buf_ptr =
s->buf + max_au_headers_size;
57 s->timestamp =
s->cur_timestamp;
60 if (
size <= max_packet_size) {
61 p =
s->buf +
s->num_frames++ * 2 + 2;
63 memcpy(
s->buf_ptr, buff,
size);
68 max_packet_size =
s->max_payload_size - 4;
74 memcpy(p + 4, buff,
len);
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
Compare two timestamps each in its own time base.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
void ff_rtp_send_aac(AVFormatContext *s1, const uint8_t *buff, int size)
void * priv_data
Format private data.
AVStream ** streams
A list of all streams in the file.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.