diff options
author | Rodger Combs <rodger.combs@gmail.com> | 2018-01-12 19:08:27 -0600 |
---|---|---|
committer | Rodger Combs <rodger.combs@gmail.com> | 2018-01-18 19:18:33 -0600 |
commit | 381a4820c64ba2d1b3ddc3a50147961f1d8c5848 (patch) | |
tree | 4a24716023e77d9ac7aeb550f65be4d06bc28e29 | |
parent | fb3fd4d506238c7ef731a2c031c744abb1c54813 (diff) | |
download | ffmpeg-381a4820c64ba2d1b3ddc3a50147961f1d8c5848.tar.gz |
lavfi/vf_scale_vaapi: set output SAR
-rw-r--r-- | libavfilter/vf_scale_vaapi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index 22e928c098..4bead5aaf4 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; |