28 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0
31 17, 23, 32, 36, 40, 46, 50, 58, 60, 5, 5, 0, 0, 0, 0, 0
85 for (frames = 1; frames < len && (buf[frames] & 0x80); frames++) ;
87 if (1 + frames >= len) {
93 speech_data = buf + 1 + frames;
103 for (i = 0; i < frames; i++) {
105 int frame_size = frame_sizes[(toc >> 3) & 0x0f];
107 if (speech_data + frame_size > buf + len) {
111 memset(ptr, 0, pkt->
data + pkt->
size - ptr);
120 memcpy(ptr, speech_data, frame_size);
125 if (speech_data < buf + len) {
128 memset(ptr, 0, pkt->
data + pkt->
size - ptr);
137 const char *attr,
const char *
value)
143 if (!strcmp(value,
"")) {
145 "nonstandard empty value\n", attr);
148 if (!strcmp(attr,
"octet-align"))
150 else if (!strcmp(attr,
"crc"))
151 data->
crc = atoi(value);
152 else if (!strcmp(attr,
"interleaving"))
154 else if (!strcmp(attr,
"channels"))
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
ptrdiff_t const GLvoid * data
static int amr_parse_sdp_line(AVFormatContext *s, int st_index, PayloadContext *data, const char *line)
#define AV_LOG_WARNING
Something somehow does not look correct.
static av_cold int init(AVCodecContext *avctx)
static int amr_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value)
RTP/JPEG specific private data.
int index
stream index in AVFormatContext
RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler
static const uint8_t frame_sizes[]
AVStream ** streams
A list of all streams in the file.
static int amr_handle_packet(AVFormatContext *ctx, PayloadContext *data, AVStream *st, AVPacket *pkt, uint32_t *timestamp, const uint8_t *buf, int len, uint16_t seq, int flags)
static const uint8_t frame_sizes_nb[16]
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
audio channel layout utility functions
GLsizei GLboolean const GLfloat * value
static const uint8_t frame_sizes_wb[16]
int ff_parse_fmtp(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *p, int(*parse_fmtp)(AVFormatContext *s, AVStream *stream, PayloadContext *data, const char *attr, const char *value))
int av_strstart(const char *str, const char *pfx, const char **ptr)
Return non-zero if pfx is a prefix of str.
int channels
number of audio channels
static av_cold int amr_init(AVFormatContext *s, int st_index, PayloadContext *data)
#define AV_CH_LAYOUT_MONO
RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler
This structure stores compressed data.