Unified · Split
| @@ -215,6 +215,9 @@ static int reconfig(struct vo *vo, struct mp_image_params *params) · 214 unmodified lines | ||
| 215 | 215 | if (mp_sws_reinit(p->sws) < 0) |
| 216 | 216 | return -1; |
| 217 | 217 | |
| 218 | + mp_mutex_lock(&vo->params_mutex); | |
| 219 | + vo->target_params = &p->sws->dst; // essentially constant, so this is okay | |
| 220 | + mp_mutex_unlock(&vo->params_mutex); | |
| 218 | 221 | vo->want_redraw = true; |
| 219 | 222 | return 0; |
| 220 | 223 | } |
| @@ -195,6 +195,7 @@ static int resize(struct vo *vo) · 194 unmodified lines | ||
| 195 | 195 | vo->dwidth = width; |
| 196 | 196 | vo->dheight = height; |
| 197 | 197 | vo_get_src_dst_rects(vo, &p->src, &p->dst, &p->osd); |
| 198 | + | |
| 198 | 199 | p->sws->dst = (struct mp_image_params) { |
| 199 | 200 | .imgfmt = MP_SELECT_LE_BE(IMGFMT_BGR0, IMGFMT_0RGB), |
| 200 | 201 | .w = width, |
| @@ -203,6 +204,10 @@ static int resize(struct vo *vo) · 2 unmodified lines | ||
| 203 | 204 | .p_h = 1, |
| 204 | 205 | }; |
| 205 | 206 | mp_image_params_guess_csp(&p->sws->dst); |
| 207 | + mp_mutex_lock(&vo->params_mutex); | |
| 208 | + vo->target_params = &p->sws->dst; | |
| 209 | + mp_mutex_unlock(&vo->params_mutex); | |
| 210 | + | |
| 206 | 211 | while (p->free_buffers) { |
| 207 | 212 | buf = p->free_buffers; |
| 208 | 213 | p->free_buffers = buf->next; |
| @@ -266,6 +266,10 @@ static bool resize(struct vo *vo) · 265 unmodified lines | ||
| 266 | 266 | |
| 267 | 267 | if (mp_sws_reinit(p->sws) < 0) |
| 268 | 268 | return false; |
| 269 | + | |
| 270 | + mp_mutex_lock(&vo->params_mutex); | |
| 271 | + vo->target_params = &p->sws->dst; | |
| 272 | + mp_mutex_unlock(&vo->params_mutex); | |
| 269 | 273 | } |
| 270 | 274 | |
| 271 | 275 | vo->want_redraw = true; |