aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_hwupload.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-10-31 22:14:10 +0000
committerMark Thompson <sw@jkqxz.net>2016-11-02 20:07:15 +0000
commit7e2561fa8313982aa21f7657953eedeeb33b210d (patch)
tree1158e9d8c5a42bf5a6616dabb084117c92566c51 /libavfilter/vf_hwupload.c
parent7433feb82f75827884d909de34d341a1c4401d4a (diff)
downloadffmpeg-7e2561fa8313982aa21f7657953eedeeb33b210d.tar.gz
lavfi: Use ff_get_video_buffer in all filters using hwframes
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 c438d5aac9..8c43e0080d 100644
--- a/libavfilter/vf_hwupload.c
+++ b/libavfilter/vf_hwupload.c
@@ -161,15 +161,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;
}