On Fri, 15 Apr 2016 10:50:12 +0200
Anton Khirnov <[email protected]> wrote:
> The reasoning is the same as for the previous commit.
> ---
> libavfilter/vf_hwdownload.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
> index 0ba1d98..0c0d630 100644
> --- a/libavfilter/vf_hwdownload.c
> +++ b/libavfilter/vf_hwdownload.c
> @@ -141,7 +141,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;
> @@ -153,6 +154,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;
LGTM, as long as ff_get_video_buffer() really has no problem with frame
requests that are not the same dimension as the outlink. But I guess
that's as designed, and the reason why it has the width/height arguments
in the first place.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel