Lines Matching refs:cx_frame
154 static void coded_frame_add(void *list, struct FrameListData *cx_frame)
160 *p = cx_frame;
161 cx_frame->next = NULL;
164 static av_cold void free_coded_frame(struct FrameListData *cx_frame)
166 av_freep(&cx_frame->buf);
167 av_freep(&cx_frame);
367 * Write buffer information from @a cx_frame to @a buf & @a buf_size.
372 static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
375 if ((int) cx_frame->sz <= buf_size) {
376 buf_size = cx_frame->sz;
377 memcpy(buf, cx_frame->buf, buf_size);
378 coded_frame->pts = cx_frame->pts;
379 coded_frame->key_frame = !!(cx_frame->flags & VPX_FRAME_IS_KEY);
388 cx_frame->sz, buf_size);
411 struct FrameListData *cx_frame = ctx->coded_frame_list;
413 size = storeframe(avctx, cx_frame, buf, buf_size, coded_frame);
416 ctx->coded_frame_list = cx_frame->next;
417 free_coded_frame(cx_frame);
426 struct FrameListData cx_frame;
431 cx_pktcpy(&cx_frame, pkt);
432 size = storeframe(avctx, &cx_frame, buf, buf_size, coded_frame);
436 struct FrameListData *cx_frame =
439 if (!cx_frame) {
444 cx_pktcpy(cx_frame, pkt);
445 cx_frame->buf = av_malloc(cx_frame->sz);
447 if (!cx_frame->buf) {
450 cx_frame->sz);
453 memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);
454 coded_frame_add(&ctx->coded_frame_list, cx_frame);