aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar Paul B Mahol <onemda@gmail.com>2015-10-29 12:42:24 +0100
committerGravatar wm4 <wm4@nowhere>2015-10-29 12:59:13 +0100
commit532f05b83dcba6274e81aa7f754d6b40e9336ca1 (patch)
treeaf3a35ffe211b64e4c67d7db70548136bf00abce /video
parent33489feca868dfefbfb49510f2596d91932752f0 (diff)
vo_drm: show osd in audio only mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_drm.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c
index 0b60b8eeef..b8a1660fb9 100644
--- a/video/out/vo_drm.c
+++ b/video/out/vo_drm.c
@@ -501,14 +501,19 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
{
struct priv *p = vo->priv;
- if (p->active && mpi) {
- struct mp_image src = *mpi;
- struct mp_rect src_rc = p->src;
- src_rc.x0 = MP_ALIGN_DOWN(src_rc.x0, mpi->fmt.align_x);
- src_rc.y0 = MP_ALIGN_DOWN(src_rc.y0, mpi->fmt.align_y);
- mp_image_crop_rc(&src, src_rc);
- mp_sws_scale(p->sws, p->cur_frame, &src);
- osd_draw_on_image(vo->osd, p->osd, src.pts, 0, p->cur_frame);
+ if (p->active) {
+ if (mpi) {
+ struct mp_image src = *mpi;
+ struct mp_rect src_rc = p->src;
+ src_rc.x0 = MP_ALIGN_DOWN(src_rc.x0, mpi->fmt.align_x);
+ src_rc.y0 = MP_ALIGN_DOWN(src_rc.y0, mpi->fmt.align_y);
+ mp_image_crop_rc(&src, src_rc);
+ mp_sws_scale(p->sws, p->cur_frame, &src);
+ osd_draw_on_image(vo->osd, p->osd, src.pts, 0, p->cur_frame);
+ } else {
+ mp_image_clear(p->cur_frame, 0, 0, p->cur_frame->w, p->cur_frame->h);
+ osd_draw_on_image(vo->osd, p->osd, 0, 0, p->cur_frame);
+ }
struct modeset_buf *front_buf = &p->dev->bufs[p->dev->front_buf];
int w = p->dst.x1 - p->dst.x0;