summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-23 22:02:40 +0200
committerwm4 <wm4@nowhere>2015-04-23 22:02:40 +0200
commit994438dee5704c18d86671c62b8497457a3a00af (patch)
treea002d0367c61f644c4844b580785226bd82a49c2
parent91f6f2bf11af3705e55f16fef6379f4b2092a19d (diff)
downloadmpv-994438dee5704c18d86671c62b8497457a3a00af.tar.bz2
mpv-994438dee5704c18d86671c62b8497457a3a00af.tar.xz
vf_vapoursynth: update _FieldBased semantics
These changed in VapourSynth. Also, "_Field" is now unused.
-rw-r--r--video/filter/vf_vapoursynth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c
index 8e3854442d..01cacbf742 100644
--- a/video/filter/vf_vapoursynth.c
+++ b/video/filter/vf_vapoursynth.c
@@ -168,10 +168,10 @@ static void copy_mp_to_vs_frame_props_map(struct vf_priv_s *p, VSMap *map,
}
if (pict_type)
p->vsapi->propSetData(map, "_PictType", &pict_type, 1, 0);
- p->vsapi->propSetInt(map, "_FieldBased",
- !!(img->fields & MP_IMGFIELD_INTERLACED), 0);
- p->vsapi->propSetInt(map, "_Field",
- !!(img->fields & MP_IMGFIELD_TOP_FIRST), 0);
+ int field = 0;
+ if (img->fields & MP_IMGFIELD_INTERLACED)
+ field = img->fields & MP_IMGFIELD_TOP_FIRST ? 2 : 1;
+ p->vsapi->propSetInt(map, "_FieldBased", field, 0);
}
static int set_vs_frame_props(struct vf_priv_s *p, VSFrameRef *frame,