summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl_old.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-06 15:21:26 +0100
committerwm4 <wm4@nowhere>2015-01-06 16:51:02 +0100
commit5410a5b2c55b5c7d9889451c1d6e56c697325a2c (patch)
treee7989451ced95a879a1d92b9037db86fa6b4c9e0 /video/out/vo_opengl_old.c
parenta52ca8a2b075388dc7dd5012e4e3f4871e26b133 (diff)
downloadmpv-5410a5b2c55b5c7d9889451c1d6e56c697325a2c.tar.bz2
mpv-5410a5b2c55b5c7d9889451c1d6e56c697325a2c.tar.xz
csputils: move image_params -> csp_params into a function
Although the line count increases, this is better for making sure everything is handled consistently for all users of the mp_csp_params stuff. This also makes sure mp_csp_params is always initialized with MP_CSP_PARAMS_DEFAULTS (for consistency).
Diffstat (limited to 'video/out/vo_opengl_old.c')
-rw-r--r--video/out/vo_opengl_old.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index b88b36e5d1..6c9bfb62a0 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -1346,11 +1346,8 @@ static void update_yuvconv(struct vo *vo)
if (!vo->params)
return;
- struct mp_csp_params cparams = {
- .colorspace = vo->params->colorspace,
- .levels_in = vo->params->colorlevels,
- .levels_out = vo->params->outputlevels,
- };
+ struct mp_csp_params cparams = MP_CSP_PARAMS_DEFAULTS;
+ mp_csp_set_image_params(&cparams, vo->params);
mp_csp_copy_equalizer_values(&cparams, &p->video_eq);
gl_conversion_params_t params = {
p->target, p->yuvconvtype, cparams,