Lines Matching refs:frame

302     AVFrame *frame = (AVFrame *)data;
304 av_frame_free(&frame);
319 const VSFrameRef *frame;
327 if (d->frame)
328 d->vsapi->freeFrame(d->frame);
339 AVFrame *frame = NULL;
369 av_log(s, AV_LOG_ERROR, "Error getting frame: %s\n", vserr);
375 ref_data->frame = vsframe;
385 frame = av_frame_alloc();
386 if (!frame) {
391 frame->format = st->codecpar->format;
392 frame->width = st->codecpar->width;
393 frame->height = st->codecpar->height;
394 frame->colorspace = st->codecpar->color_space;
397 frame->colorspace = get_vs_prop_int(s, props, "_Matrix", frame->colorspace);
398 frame->color_primaries = get_vs_prop_int(s, props, "_Primaries", frame->color_primaries);
399 frame->color_trc = get_vs_prop_int(s, props, "_Transfer", frame->color_trc);
402 frame->color_range = AVCOL_RANGE_JPEG;
404 frame->sample_aspect_ratio.num = get_vs_prop_int(s, props, "_SARNum", 0);
405 frame->sample_aspect_ratio.den = get_vs_prop_int(s, props, "_SARDen", 1);
407 av_assert0(vs->vsapi->getFrameWidth(vsframe, 0) == frame->width);
408 av_assert0(vs->vsapi->getFrameHeight(vsframe, 0) == frame->height);
410 desc = av_pix_fmt_desc_get(frame->format);
414 ptrdiff_t plane_h = frame->height;
416 frame->data[i] = (void *)vs->vsapi->getReadPtr(vsframe, p);
417 frame->linesize[i] = vs->vsapi->getStride(vsframe, p);
419 frame->buf[i] = av_buffer_ref(vsframe_ref);
420 if (!frame->buf[i]) {
431 frame->buf[i]->data = frame->data[i];
432 frame->buf[i]->size = frame->linesize[i] * plane_h;
435 pkt->buf = av_buffer_create((uint8_t*)frame, sizeof(*frame),
442 frame = NULL; // pkt owns it now
454 av_frame_free(&frame);