Lines Matching refs:frame
211 static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
233 if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
235 memcpy(frame->data[1], c->pal, AVPALETTE_SIZE);
236 frame->palette_has_changed = pc;
238 outptr = frame->data[0];
241 stride = frame->linesize[0];
264 frame->key_frame = 0;
265 frame->pict_type = AV_PICTURE_TYPE_P;
267 memcpy(frame->data[0], c->prev->data[0], frame->linesize[0] * avctx->height);
268 else{ // Should happen only when first frame is 'NULL'
269 memset(frame->data[0], 0, frame->linesize[0] * avctx->height);
270 frame->key_frame = 1;
271 frame->pict_type = AV_PICTURE_TYPE_I;
276 frame->key_frame = 1;
277 frame->pict_type = AV_PICTURE_TYPE_I;
287 av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
291 frame->key_frame = 0;
292 frame->pict_type = AV_PICTURE_TYPE_P;
306 frame->key_frame = 0;
307 frame->pict_type = AV_PICTURE_TYPE_P;
309 av_log(avctx, AV_LOG_ERROR, "Missing reference frame\n");
312 decode_13(avctx, c, frame->data[0], frame->linesize[0], srcptr, dsize, c->prev->data[0]);
320 if ((ret = av_frame_ref(c->prev, frame)) < 0)