summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-27 17:05:26 +0200
committerwm4 <wm4@nowhere>2014-04-27 17:05:26 +0200
commit9e47bd11cc97074e5f8626832333a448e67bae88 (patch)
treeb58f34094cd424610e2e6e56bd54527f9c6f2535 /video
parent4e973c059a859103fc3fef08b023f9b581246815 (diff)
downloadmpv-9e47bd11cc97074e5f8626832333a448e67bae88.tar.bz2
mpv-9e47bd11cc97074e5f8626832333a448e67bae88.tar.xz
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.)
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_vapoursynth.c6
1 files changed, 3 insertions, 3 deletions
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)