History

vo_gpu_next: force a reset when --image-lut is updated

Bit of an edge case since image-lut requires the frames to be remapped again so the normal redraw when paused doesn't work. Also we use update_options in the VOCTRL here.

Dudemanguy committed 2 years ago

Commit 48963ae1 parent 6da3a151 file · +8 −2Browse files

Unified · Split

video/out/vo_gpu_next.c+8−2
@@ -1518,13 +1518,19 @@ static int control(struct vo *vo, uint32_t request, void *data) · 1517 unmodified lines
15181518 return VO_TRUE;
15191519
15201520 case VOCTRL_UPDATE_RENDER_OPTS: {
1521− m_config_cache_update(p->opts_cache);
15221521 update_ra_ctx_options(vo, &p->ra_ctx->opts);
15231522 if (p->ra_ctx->fns->update_render_opts)
15241523 p->ra_ctx->fns->update_render_opts(p->ra_ctx);
1525− update_render_options(vo);
15261524 vo->want_redraw = true;
15271525
1526+ // Special case for --image-lut which requires a full reset.
1527+ int old_type = p->next_opts->image_lut.type;
1528+ update_options(vo);
1529+ struct user_lut image_lut = p->next_opts->image_lut;
1530+ p->want_reset |= image_lut.opt && ((!image_lut.path && image_lut.opt) ||
1531+ (image_lut.path && strcmp(image_lut.path, image_lut.opt)) ||
1532+ (old_type != image_lut.type));
1533+
15281534 // Also re-query the auto profile, in case `update_render_options`
15291535 // unloaded a manually specified icc profile in favor of
15301536 // icc-profile-auto

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t