[FFmpeg-devel] [PATCH] lavfi/vf_scale_vaapi: set output SAR
Mark Thompson
sw at jkqxz.net
Fri Jan 19 03:18:24 EET 2018
On 13/01/18 01:08, Rodger Combs wrote:
> ---
> libavfilter/vf_scale_vaapi.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c
> index 22e928c..4bead5a 100644
> --- a/libavfilter/vf_scale_vaapi.c
> +++ b/libavfilter/vf_scale_vaapi.c
> @@ -240,6 +240,11 @@ static int scale_vaapi_config_output(AVFilterLink *outlink)
> goto fail;
> }
>
> + if (inlink->sample_aspect_ratio.num)
> + outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h * inlink->w, outlink->w * inlink->h}, inlink->sample_aspect_ratio);
> + else
> + outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
> +
> av_freep(&hwconfig);
> av_hwframe_constraints_free(&constraints);
> return 0;
>
Tested, LGTM.
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list