]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_deinterlace_qsv.c
Merge commit '124e26971e69bb25f38c6c7cb3fa20c77cf10966'
[ffmpeg] / libavfilter / vf_deinterlace_qsv.c
index e7491e10dfde0585dcef26619665bab9202ae8ec..2810bffe461b86dcd7b64bad945fffb88da83315 100644 (file)
@@ -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;
@@ -529,7 +527,7 @@ static int qsvdeint_request_frame(AVFilterLink *outlink)
 }
 
 #define OFFSET(x) offsetof(QSVDeintContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 static const AVOption options[] = {
     { NULL },
 };
@@ -572,4 +570,6 @@ AVFilter ff_vf_deinterlace_qsv = {
 
     .inputs    = qsvdeint_inputs,
     .outputs   = qsvdeint_outputs,
+
+    .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
 };