diff options
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; } |