diff options
author | Mark Thompson <sw@jkqxz.net> | 2016-10-31 22:14:10 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2016-11-02 20:07:15 +0000 |
commit | 7e2561fa8313982aa21f7657953eedeeb33b210d (patch) | |
tree | 1158e9d8c5a42bf5a6616dabb084117c92566c51 /libavfilter/vf_hwupload.c | |
parent | 7433feb82f75827884d909de34d341a1c4401d4a (diff) | |
download | ffmpeg-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.c | 9 |
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; } |