diff options
Diffstat (limited to 'libavfilter/vf_deinterlace_qsv.c')
-rw-r--r-- | libavfilter/vf_deinterlace_qsv.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libavfilter/vf_deinterlace_qsv.c b/libavfilter/vf_deinterlace_qsv.c index e7491e10df..2fe74c1a75 100644 --- a/libavfilter/vf_deinterlace_qsv.c +++ b/libavfilter/vf_deinterlace_qsv.c @@ -434,13 +434,11 @@ static int process_frame(AVFilterContext *ctx, const AVFrame *in, mfxStatus err; int ret, again = 0; - out = av_frame_alloc(); - if (!out) - return AVERROR(ENOMEM); - - ret = av_hwframe_get_buffer(s->hw_frames_ctx, out, 0); - if (ret < 0) + out = ff_get_video_buffer(outlink, outlink->w, outlink->h); + if (!out) { + ret = AVERROR(ENOMEM); goto fail; + } surf_out = (mfxFrameSurface1*)out->data[3]; surf_out->Info.CropW = outlink->w; |