AVFrame *out = NULL;
int ret = 0;
- out = av_frame_alloc();
+ out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
ret = AVERROR(ENOMEM);
goto fail;
}
- ret = av_hwframe_get_buffer(s->out_frames_ref, out, 0);
- if (ret < 0)
- goto fail;
-
do {
err = MFXVideoVPP_RunFrameVPPAsync(s->session,
(mfxFrameSurface1*)in->data[3],