From 9e47bd11cc97074e5f8626832333a448e67bae88 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 27 Apr 2014 17:05:26 +0200 Subject: vf_vapoursynth: keep pixel aspect ratio Make the filter apply the pixel aspect ratio of the input to the output. This is more useful than forcing 1:1 PAR when playing anamorphic video such as DVDs. VapourSynth itself actually allows passing through the aspect ratio, but it's in a not very useful form for us: it's per video-frame instead of constant (i.e in VSVideoInfo). As long as we don't have a way to allow a filter to spontaneously change output parameters, we can't use this. (And I don't really feel like making this possible.) --- video/filter/vf_vapoursynth.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 4acea8e056..f7382e9678 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -423,10 +423,10 @@ static int config(struct vf_instance *vf, int width, int height, destroy_vs(vf); return 0; } - width = vi->width; - height = vi->height; - return vf_next_config(vf, width, height, width, height, flags, fmt); + vf_rescale_dsize(&d_width, &d_height, width, height, vi->width, vi->height); + + return vf_next_config(vf, vi->width, vi->height, d_width, d_height, flags, fmt); } static int query_format(struct vf_instance *vf, unsigned int fmt) -- cgit v1.2.3