32 #if FF_API_DESTRUCT_PACKET
58 #if FF_API_DESTRUCT_PACKET
94 #if FF_API_DESTRUCT_PACKET
96 pkt->destruct = dummy_destruct_packet;
105 if (pkt->
size <= size)
117 if ((
unsigned)grow_by >
131 #if FF_API_DESTRUCT_PACKET
133 pkt->destruct = dummy_destruct_packet;
138 pkt->
size += grow_by;
139 memset(pkt->
data + pkt->
size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
156 #if FF_API_DESTRUCT_PACKET
158 pkt->destruct = dummy_destruct_packet;
165 #define ALLOC_MALLOC(data, size) data = av_malloc(size)
166 #define ALLOC_BUF(data, size) \
168 av_buffer_realloc(&pkt->buf, size); \
169 data = pkt->buf ? pkt->buf->data : NULL; \
172 #define DUP_DATA(dst, src, size, padding, ALLOC) \
176 if ((unsigned)(size) > \
177 (unsigned)(size) + FF_INPUT_BUFFER_PADDING_SIZE) \
179 ALLOC(data, size + FF_INPUT_BUFFER_PADDING_SIZE); \
185 memcpy(data, src, size); \
187 memset((uint8_t *)data + size, 0, \
188 FF_INPUT_BUFFER_PADDING_SIZE); \
206 #if FF_API_DESTRUCT_PACKET
208 pkt->destruct = dummy_destruct_packet;
285 #if FF_API_DESTRUCT_PACKET
286 else if (pkt->destruct)
288 pkt->destruct = NULL;
303 if ((
unsigned)elems + 1 > INT_MAX /
sizeof(*pkt->
side_data))
338 #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL
357 #if FF_API_DESTRUCT_PACKET
359 pkt->destruct = dummy_destruct_packet;
371 memset(p, 0, FF_INPUT_BUFFER_PADDING_SIZE);
389 if (size>INT_MAX || p - pkt->
data < size)
410 pkt->
size -= size + 5;
461 memcpy(dst_data, src_data, size);