summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/vo_drm.c3
-rw-r--r--video/out/vo_wlshm.c5
-rw-r--r--video/out/vo_x11.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/video/out/vo_drm.c b/video/out/vo_drm.c
index 25ba06b683..db1981eb7a 100644
--- a/video/out/vo_drm.c
+++ b/video/out/vo_drm.c
@@ -215,6 +215,9 @@ static int reconfig(struct vo *vo, struct mp_image_params *params)
if (mp_sws_reinit(p->sws) < 0)
return -1;
+ mp_mutex_lock(&vo->params_mutex);
+ vo->target_params = &p->sws->dst; // essentially constant, so this is okay
+ mp_mutex_unlock(&vo->params_mutex);
vo->want_redraw = true;
return 0;
}
diff --git a/video/out/vo_wlshm.c b/video/out/vo_wlshm.c
index 0a64e6ccb2..d2aa11d0ad 100644
--- a/video/out/vo_wlshm.c
+++ b/video/out/vo_wlshm.c
@@ -195,6 +195,7 @@ static int resize(struct vo *vo)
vo->dwidth = width;
vo->dheight = height;
vo_get_src_dst_rects(vo, &p->src, &p->dst, &p->osd);
+
p->sws->dst = (struct mp_image_params) {
.imgfmt = MP_SELECT_LE_BE(IMGFMT_BGR0, IMGFMT_0RGB),
.w = width,
@@ -203,6 +204,10 @@ static int resize(struct vo *vo)
.p_h = 1,
};
mp_image_params_guess_csp(&p->sws->dst);
+ mp_mutex_lock(&vo->params_mutex);
+ vo->target_params = &p->sws->dst;
+ mp_mutex_unlock(&vo->params_mutex);
+
while (p->free_buffers) {
buf = p->free_buffers;
p->free_buffers = buf->next;
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index fa9315726d..b637b59e23 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -266,6 +266,10 @@ static bool resize(struct vo *vo)
if (mp_sws_reinit(p->sws) < 0)
return false;
+
+ mp_mutex_lock(&vo->params_mutex);
+ vo->target_params = &p->sws->dst;
+ mp_mutex_unlock(&vo->params_mutex);
}
vo->want_redraw = true;