summaryrefslogtreecommitdiffstats
path: root/video/out/vo_rpi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-08-15 19:12:39 +0200
committerwm4 <wm4@nowhere>2017-08-15 19:41:23 +0200
commit34ab0386cb1f28197ca11e90cd0236e352083758 (patch)
tree68c90a60549bcf65ef615d20d2d59fb745ba49f6 /video/out/vo_rpi.c
parent935df644af755fdf17a47a61ee840f5baec33cd3 (diff)
downloadmpv-34ab0386cb1f28197ca11e90cd0236e352083758.tar.bz2
mpv-34ab0386cb1f28197ca11e90cd0236e352083758.tar.xz
vo_rpi: fix operation
Commit 697c4389a9e6 worked "almost". I couldn't test it at the time.
Diffstat (limited to 'video/out/vo_rpi.c')
-rw-r--r--video/out/vo_rpi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c
index 1a1e357feb..5b5d62c78f 100644
--- a/video/out/vo_rpi.c
+++ b/video/out/vo_rpi.c
@@ -260,13 +260,12 @@ static void update_osd(struct vo *vo)
MP_STATS(vo, "start rpi_osd");
- struct vo_frame frame = {
- .pts = p->osd_pts,
- };
+ struct vo_frame frame = {0};
struct fbodst target = {
.tex = ra_create_wrapped_fb(p->egl.ra, 0, p->osd_res.w, p->osd_res.h),
.flip = true,
};
+ gl_video_set_osd_pts(p->gl_video, p->osd_pts);
gl_video_render_frame(p->gl_video, &frame, target);
ra_tex_free(p->egl.ra, &target.tex);
@@ -317,6 +316,9 @@ static void resize(struct vo *vo)
if (mmal_port_parameter_set(input, &dr.hdr))
MP_WARN(vo, "could not set video rectangle\n");
+
+ if (p->gl_video)
+ gl_video_resize(p->gl_video, &src, &dst, &p->osd_res);
}
static void destroy_overlays(struct vo *vo)
@@ -411,6 +413,7 @@ static int create_overlays(struct vo *vo)
return -1;
}
p->gl_video = gl_video_init(p->egl.ra, vo->log, vo->global);
+ gl_video_set_clear_color(p->gl_video, (struct m_color){.a = 0});
gl_video_set_osd_source(p->gl_video, vo->osd);
}
@@ -432,6 +435,8 @@ static int create_overlays(struct vo *vo)
}
}
+ resize(vo);
+
vo_event(vo, VO_EVENT_WIN_STATE);
vc_dispmanx_update_submit_sync(p->update);
@@ -676,6 +681,8 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
return -1;
}
+ resize(vo);
+
return 0;
}