Browse Source

vf_hwdownload: allocate the destination frame for the pool size

The reasoning is the same as for the previous commit.
tags/n3.3
Anton Khirnov 9 years ago
parent
commit
c3f113d584
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavfilter/vf_hwdownload.c

+ 5
- 1
libavfilter/vf_hwdownload.c View File

@@ -140,7 +140,8 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
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) {
err = AVERROR(ENOMEM);
goto fail;
@@ -152,6 +153,9 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
goto fail;
}

output->width = outlink->w;
output->height = outlink->h;

err = av_frame_copy_props(output, input);
if (err < 0)
goto fail;


Loading…
Cancel
Save