Lines Matching refs:frame
38 AVFrame *frame;
276 // starts from the input pts of the first frame, while the output pts
288 static IMFSample *mf_a_avframe_to_sample(AVCodecContext *avctx, const AVFrame *frame)
296 len = frame->nb_samples * bps;
298 sample = ff_create_memory_sample(&c->functions, frame->data[0], len,
301 IMFSample_SetSampleDuration(sample, mf_to_mf_time(avctx, frame->nb_samples));
305 static IMFSample *mf_v_avframe_to_sample(AVCodecContext *avctx, const AVFrame *frame)
337 ret = av_image_copy_to_buffer((uint8_t *)data, size, (void *)frame->data, frame->linesize,
347 IMFSample_SetSampleDuration(sample, mf_to_mf_time(avctx, frame->pkt_duration));
352 static IMFSample *mf_avframe_to_sample(AVCodecContext *avctx, const AVFrame *frame)
358 sample = mf_a_avframe_to_sample(avctx, frame);
360 sample = mf_v_avframe_to_sample(avctx, frame);
364 mf_sample_set_pts(avctx, sample, frame->pts);
397 // Some MFTs (AC3) will send a frame after each drain command (???), so
495 if (!c->frame->buf[0]) {
496 ret = ff_encode_get_frame(avctx, c->frame);
501 if (c->frame->buf[0]) {
502 sample = mf_avframe_to_sample(avctx, c->frame);
504 av_frame_unref(c->frame);
508 if (c->frame->pict_type == AV_PICTURE_TYPE_I || !c->sample_sent)
517 av_frame_unref(c->frame);
1053 c->frame = av_frame_alloc();
1054 if (!c->frame)
1117 // way at all, not even after encoding a frame - it's only
1201 av_frame_free(&c->frame);