Skip to content

Commit

Permalink
[obs] fix non-dmabuf 24-bit imports
Browse files Browse the repository at this point in the history
OBS `GS_RGBA` maps to the sRGB color space which breaks our mapping
kludge, as such we need to use the UNORM variants to avoid this
  • Loading branch information
gnif committed Jan 26, 2024
1 parent 1b75ae0 commit ad00aaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions obs/lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,12 @@ static void lgVideoTick(void * data, float seconds)
switch(this->type)
{
case FRAME_TYPE_BGRA:
format = GS_BGRA;
format = GS_BGRA_UNORM;
drm_format = DRM_FORMAT_ARGB8888;
break;

case FRAME_TYPE_RGBA:
format = GS_RGBA;
format = GS_RGBA_UNORM;
drm_format = DRM_FORMAT_ARGB8888;
break;

Expand All @@ -697,7 +697,7 @@ static void lgVideoTick(void * data, float seconds)
/* fallthrough */

case FRAME_TYPE_BGR_32:
format = GS_BGRA;
format = GS_BGRA_UNORM;
drm_format = DRM_FORMAT_ARGB8888;
unpack = true;
break;
Expand Down

0 comments on commit ad00aaa

Please sign in to comment.