From 9224ae4fffdf6366131c34c4f14a0bc90d0bc2f4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 2 Feb 2018 17:47:20 +0100 Subject: vf_vapoursynth: fix output colorspace flags and other attributes Properly initialize the output frame parameters other than image format and size. This includes colorspace hints. (We're still not reading them back from VapourSynth if it sets them, though. Usually it doesn't anyway.) --- video/filter/vf_vapoursynth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index 679733a555..6b4ec87ad2 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -283,6 +283,8 @@ static void VS_CC vs_frame_done(void *userData, const VSFrameRef *f, int n, struct mp_image *res = NULL; if (f) { struct mp_image img = map_vs_frame(p, f, false); + struct mp_image dummy = {.params = p->fmt_in}; + mp_image_copy_attributes(&img, &dummy); img.pkt_duration = -1; const VSMap *map = p->vsapi->getFramePropsRO(f); if (map) { -- cgit v1.2.3