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.)
This commit is contained in:
wm4 2018-02-02 17:47:20 +01:00 committed by Kevin Mitchell
parent 7393f4d320
commit 9224ae4fff
No known key found for this signature in database
GPG Key ID: 559A34B46A917232
1 changed files with 2 additions and 0 deletions

View File

@ -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) {