[FFmpeg-cvslog] lavfi/vf_scale_vaapi: set output SAR

Rodger Combs git at videolan.org
Fri Jan 19 03:24:59 EET 2018


ffmpeg | branch: master | Rodger Combs <rodger.combs at gmail.com> | Fri Jan 12 19:08:27 2018 -0600| [381a4820c64ba2d1b3ddc3a50147961f1d8c5848] | committer: Rodger Combs

lavfi/vf_scale_vaapi: set output SAR

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=381a4820c64ba2d1b3ddc3a50147961f1d8c5848
---

 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 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;



More information about the ffmpeg-cvslog mailing list