Lines Matching refs:pc

199 int ff_combine_frame(ParseContext *pc, int next,
202 if (pc->overread) {
204 pc->overread, pc->state, next, pc->index, pc->overread_index);
210 for (; pc->overread > 0; pc->overread--)
211 pc->buffer[pc->index++] = pc->buffer[pc->overread_index++];
220 pc->last_index = pc->index;
224 void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
225 *buf_size + pc->index +
229 av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", *buf_size + pc->index + AV_INPUT_BUFFER_PADDING_SIZE);
230 pc->index = 0;
233 pc->buffer = new_buffer;
234 memcpy(&pc->buffer[pc->index], *buf, *buf_size);
235 memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
236 pc->index += *buf_size;
240 av_assert0(next >= 0 || pc->buffer);
243 pc->overread_index = pc->index + next;
246 if (pc->index) {
247 void *new_buffer = av_fast_realloc(pc->buffer, &pc->buffer_size,
248 next + pc->index +
251 av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", next + pc->index + AV_INPUT_BUFFER_PADDING_SIZE);
252 pc->overread_index =
253 pc->index = 0;
256 pc->buffer = new_buffer;
258 memcpy(&pc->buffer[pc->index], *buf,
260 pc->index = 0;
261 *buf = pc->buffer;
265 pc->overread += -8 - next;
270 pc->state = pc->state << 8 | pc->buffer[pc->last_index + next];
271 pc->state64 = pc->state64 << 8 | pc->buffer[pc->last_index + next];
272 pc->overread++;
275 if (pc->overread) {
277 pc->overread, pc->state, next, pc->index, pc->overread_index);
287 ParseContext *pc = s->priv_data;
289 av_freep(&pc->buffer);