summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/gl_video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index d7fd6774b6..43dbb843f1 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -165,7 +165,7 @@ struct gl_video {
struct mp_imgfmt_desc image_desc;
- bool is_yuv;
+ bool is_yuv, is_rgb;
bool is_linear_rgb;
// per pixel (full pixel when packed, each component when planar)
@@ -1048,7 +1048,7 @@ static void init_video(struct gl_video *p)
check_gl_features(p);
- if (!p->is_yuv && (p->opts.srgb || p->use_lut_3d)) {
+ if (p->is_rgb && (p->opts.srgb || p->use_lut_3d)) {
p->is_linear_rgb = true;
p->image.planes[0].gl_internal_format = GL_SRGB;
}
@@ -1666,6 +1666,7 @@ static bool init_format(int fmt, struct gl_video *init)
return false;
init->is_yuv = desc.flags & MP_IMGFLAG_YUV;
+ init->is_rgb = desc.flags & MP_IMGFLAG_RGB;
init->is_linear_rgb = false;
init->plane_count = desc.num_planes;
init->image_desc = desc;