Commit c3f113d5 authored by Anton Khirnov's avatar Anton Khirnov

vf_hwdownload: allocate the destination frame for the pool size

The reasoning is the same as for the previous commit.
parent fdfe0136
...@@ -140,7 +140,8 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input) ...@@ -140,7 +140,8 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
goto fail; goto fail;
} }
output = ff_get_video_buffer(outlink, outlink->w, outlink->h); output = ff_get_video_buffer(outlink, ctx->hwframes->width,
ctx->hwframes->height);
if (!output) { if (!output) {
err = AVERROR(ENOMEM); err = AVERROR(ENOMEM);
goto fail; goto fail;
...@@ -152,6 +153,9 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input) ...@@ -152,6 +153,9 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
goto fail; goto fail;
} }
output->width = outlink->w;
output->height = outlink->h;
err = av_frame_copy_props(output, input); err = av_frame_copy_props(output, input);
if (err < 0) if (err < 0)
goto fail; goto fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment