33 #if FF_API_DESTRUCT_PACKET
59 #if FF_API_DESTRUCT_PACKET
95 #if FF_API_DESTRUCT_PACKET
106 if (pkt->
size <= size)
118 if ((
unsigned)grow_by >
132 #if FF_API_DESTRUCT_PACKET
139 pkt->
size += grow_by;
140 memset(pkt->
data + pkt->
size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
157 #if FF_API_DESTRUCT_PACKET
166 #define ALLOC_MALLOC(data, size) data = av_malloc(size)
167 #define ALLOC_BUF(data, size) \
169 av_buffer_realloc(&pkt->buf, size); \
170 data = pkt->buf ? pkt->buf->data : NULL; \
173 #define DUP_DATA(dst, src, size, padding, ALLOC) \
177 if ((unsigned)(size) > \
178 (unsigned)(size) + FF_INPUT_BUFFER_PADDING_SIZE) \
180 ALLOC(data, size + FF_INPUT_BUFFER_PADDING_SIZE); \
186 memcpy(data, src, size); \
188 memset((uint8_t *)data + size, 0, \
189 FF_INPUT_BUFFER_PADDING_SIZE); \
207 #if FF_API_DESTRUCT_PACKET
287 #if FF_API_DESTRUCT_PACKET
305 if ((
unsigned)elems + 1 > INT_MAX /
sizeof(*pkt->
side_data))
340 #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL
359 #if FF_API_DESTRUCT_PACKET
373 memset(p, 0, FF_INPUT_BUFFER_PADDING_SIZE);
391 if (size>INT_MAX || p - pkt->
data < size)
412 pkt->
size -= size + 5;
434 const size_t keylen = strlen(t->
key);
435 const size_t valuelen = strlen(t->
value);
436 const size_t new_size = *size + keylen + 1 + valuelen + 1;
442 if (new_size > INT_MAX)
445 memcpy(data + *size, t->
key, keylen + 1);
446 memcpy(data + *size + keylen + 1, t->
value, valuelen + 1);
464 if (!dict || !data || !size)
478 data = val + strlen(val) + 1;
522 memcpy(dst_data, src_data, size);