40 #if FF_API_DESTRUCT_PACKET
65 #if FF_API_DESTRUCT_PACKET
90 #if FF_API_DESTRUCT_PACKET
91 pkt->destruct = dummy_destruct_packet;
99 if (pkt->
size <= size)
111 if ((
unsigned)grow_by >
125 #if FF_API_DESTRUCT_PACKET
126 pkt->destruct = dummy_destruct_packet;
130 pkt->
size += grow_by;
131 memset(pkt->
data + pkt->
size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
148 #if FF_API_DESTRUCT_PACKET
149 pkt->destruct = dummy_destruct_packet;
155 #define ALLOC_MALLOC(data, size) data = av_malloc(size)
156 #define ALLOC_BUF(data, size) \
158 av_buffer_realloc(&pkt->buf, size); \
159 data = pkt->buf ? pkt->buf->data : NULL; \
162 #define DUP_DATA(dst, src, size, padding, ALLOC) \
166 if ((unsigned)(size) > \
167 (unsigned)(size) + FF_INPUT_BUFFER_PADDING_SIZE) \
169 ALLOC(data, size + FF_INPUT_BUFFER_PADDING_SIZE); \
175 memcpy(data, src, size); \
177 memset((uint8_t *)data + size, 0, \
178 FF_INPUT_BUFFER_PADDING_SIZE); \
196 #if FF_API_DESTRUCT_PACKET
197 pkt->destruct = dummy_destruct_packet;
207 av_destruct_packet(pkt);
229 av_destruct_packet(pkt);
261 #if FF_API_DESTRUCT_PACKET
262 else if (pkt->destruct)
264 pkt->destruct = NULL;
281 if ((
unsigned)elems + 1 > INT_MAX /
sizeof(*pkt->
side_data))
316 #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL
335 #if FF_API_DESTRUCT_PACKET
336 pkt->destruct = dummy_destruct_packet;
347 memset(p, 0, FF_INPUT_BUFFER_PADDING_SIZE);
359 unsigned int size, orig_pktsize = pkt->
size;
365 if (size>INT_MAX || p - pkt->
data < size)
386 pkt->
size -= size + 5;