68 int interleave_size, interleave_index;
75 interleave_size = buf[0] >> 3 & 7;
76 interleave_index = buf[0] & 7;
78 if (interleave_size > 5) {
83 if (interleave_index > interleave_size) {
85 interleave_index, interleave_size);
93 for (i = 0; i < 6; i++)
97 if (interleave_index < data->interleave_index) {
132 if (1 + frame_size > len)
135 if (len - 1 - frame_size >
sizeof(data->
group[0].
data))
140 memcpy(pkt->
data, &buf[1], frame_size);
146 memcpy(ip->
data, &buf[1 + frame_size], ip->
size);
152 if (interleave_index == interleave_size) {
187 if (ip->
pos + frame_size > ip->
size)
217 return store_packet(ctx, data, st, pkt, timestamp, buf, len);
226 .static_payload_id = 12,
static PayloadContext * qcelp_new_context(void)
RTP/JPEG specific private data.
static int return_stored_frame(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len)
int index
stream index in AVFormatContext
RTPDynamicProtocolHandler ff_qcelp_dynamic_handler
static int store_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len)
static const uint8_t frame_sizes[]
static const uint8_t frame_size[4]
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
void av_log(void *avcl, int level, const char *fmt,...)
InterleavePacket group[6]
static int qcelp_parse_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
#define FF_ARRAY_ELEMS(a)
static void qcelp_free_context(PayloadContext *data)
uint8_t next_data[1+35 *10]
#define AVERROR_INVALIDDATA
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)