diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-04-15 11:44:02 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-06-28 09:32:00 +0300 |
commit | c3f113d58488df7594a489bdbb993a69ad47063c (patch) | |
tree | 223f9bc1ca7f8bae9c1f9a04ed0a749e8e0b1e0a /libavfilter | |
parent | fdfe01365d579189d9a55b3741dba2ac46eb1df8 (diff) |
vf_hwdownload: allocate the destination frame for the pool size
The reasoning is the same as for the previous commit.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_hwdownload.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index 4ba465bcc7..42925b83d3 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -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; |