[vlc-commits] [Git][videolan/vlc][master] vout: correctly track ICC updates in vout_display_t

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Fri Sep 23 18:15:50 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
5e3f184e by Niklas Haas at 2022-09-23T21:15:35+03:00
vout: correctly track ICC updates in vout_display_t

The line that updated the current `vd->cfg` got accidentally removed in
a previous refactor of this commit, leading to this value being
out-of-date. This broke any vouts which directly looked at
`vd->cfg->icc_profile` instead of taking the current profile from the
callback itself.

Also add a clarifying comment to this function, since it just blindly
copies over a pointer. In practice, the `vout_thread_t` takes care of
this.

- - - - -


2 changed files:

- src/video_output/display.c
- src/video_output/vout_wrapper.h


Changes:

=====================================
src/video_output/display.c
=====================================
@@ -634,6 +634,7 @@ void vout_SetDisplayIccProfile(vout_display_t *vd,
 {
     vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);
 
+    osys->cfg.icc_profile = (vlc_icc_profile_t *) profile;
     if (vd->ops->set_icc_profile)
         vd->ops->set_icc_profile(vd, profile);
 }


=====================================
src/video_output/vout_wrapper.h
=====================================
@@ -39,6 +39,9 @@ void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den);
 void vout_SetDisplayAspect(vout_display_t *, unsigned num, unsigned den);
 void vout_SetDisplayCrop(vout_display_t *, const struct vout_crop *);
 void vout_SetDisplayViewpoint(vout_display_t *, const vlc_viewpoint_t *);
+
+/* The owner/caller is responsible for managing the lifetime of this ICC
+ * profile and always updating the display state to a consistent value */
 void vout_SetDisplayIccProfile(vout_display_t *, const vlc_icc_profile_t *);
 
 #endif /* LIBVLC_VOUT_WRAPPER_H */



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5e3f184e919f5dfced35e1d2b514d59a57d00088

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5e3f184e919f5dfced35e1d2b514d59a57d00088
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list