summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale_vaapi.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-29 23:31:20 +0200
committerMatthieu Bouron <matthieu.bouron@gmail.com>2017-03-29 23:33:20 +0200
commit78e871ebbcc6f3c877e7292c4dda0c9979f8ede4 (patch)
treedde035107feb68839a074828a4c9f4c36e27fa3d /libavfilter/vf_scale_vaapi.c
parentb4016ef31a6ea007e481427ade35ac35d1519170 (diff)
parent7e2561fa8313982aa21f7657953eedeeb33b210d (diff)
downloadffmpeg-78e871ebbcc6f3c877e7292c4dda0c9979f8ede4.tar.gz
Merge commit '7e2561fa8313982aa21f7657953eedeeb33b210d'
* commit '7e2561fa8313982aa21f7657953eedeeb33b210d': lavfi: Use ff_get_video_buffer in all filters using hwframes vf_hwupload_cuda: Fix build error Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Diffstat (limited to 'libavfilter/vf_scale_vaapi.c')
-rw-r--r--libavfilter/vf_scale_vaapi.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
index 8221849ee0..c4334c7664 100644
--- a/libavfilter/vf_scale_vaapi.c
+++ b/libavfilter/vf_scale_vaapi.c
@@ -32,6 +32,7 @@
#include "formats.h"
#include "internal.h"
#include "scale.h"
+#include "video.h"
typedef struct ScaleVAAPIContext {
const AVClass *class;
@@ -288,19 +289,13 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
av_log(ctx, AV_LOG_DEBUG, "Using surface %#x for scale input.\n",
input_surface);
- output_frame = av_frame_alloc();
+ output_frame = ff_get_video_buffer(outlink, ctx->output_width,
+ ctx->output_height);
if (!output_frame) {
- av_log(ctx, AV_LOG_ERROR, "Failed to allocate output frame.");
err = AVERROR(ENOMEM);
goto fail;
}
- err = av_hwframe_get_buffer(ctx->output_frames_ref, output_frame, 0);
- if (err < 0) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get surface for "
- "output: %d\n.", err);
- }
-
output_surface = (VASurfaceID)(uintptr_t)output_frame->data[3];
av_log(ctx, AV_LOG_DEBUG, "Using surface %#x for scale output.\n",
output_surface);