Browse Source

opengl/sw: only check YUV status when needed

No need to check if we're going to reject the chroma anyway.
pull/162/head
Steve Lhomme 3 years ago
parent
commit
2a5e910dd3
  1. 3
      modules/video_output/opengl/interop_sw.c

3
modules/video_output/opengl/interop_sw.c

@ -653,7 +653,6 @@ static int
opengl_interop_init(struct vlc_gl_interop *interop,
vlc_fourcc_t chroma, video_color_space_t yuv_space)
{
bool is_yuv = vlc_fourcc_IsYUV(chroma);
const vlc_chroma_description_t *desc =
vlc_fourcc_GetChromaDescription(chroma);
if (!desc)
@ -670,7 +669,7 @@ opengl_interop_init(struct vlc_gl_interop *interop,
return VLC_SUCCESS;
}
if (is_yuv)
if (vlc_fourcc_IsYUV(chroma))
return interop_yuv_base_init(interop, desc);
return interop_rgb_base_init(interop, chroma);

Loading…
Cancel
Save