summaryrefslogtreecommitdiff
path: root/libavfilter/vf_hwupload.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_hwupload.c
parentb4016ef31a6ea007e481427ade35ac35d1519170 (diff)
parent7e2561fa8313982aa21f7657953eedeeb33b210d (diff)
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_hwupload.c')
-rw-r--r--libavfilter/vf_hwupload.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c
index f54ce9faa7..9237253f23 100644
--- a/libavfilter/vf_hwupload.c
+++ b/libavfilter/vf_hwupload.c
@@ -159,15 +159,10 @@ static int hwupload_filter_frame(AVFilterLink *link, AVFrame *input)
if (input->format == outlink->format)
return ff_filter_frame(outlink, input);
- output = av_frame_alloc();
+ output = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!output) {
- err = AVERROR(ENOMEM);
- goto fail;
- }
-
- err = av_hwframe_get_buffer(ctx->hwframes_ref, output, 0);
- if (err < 0) {
av_log(ctx, AV_LOG_ERROR, "Failed to allocate frame to upload to.\n");
+ err = AVERROR(ENOMEM);
goto fail;
}