[vlc-commits] [Git][videolan/vlc][master] opengl: fix chroma check from UpdateFormat()
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Feb 1 12:53:04 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f32d2d32 by Thomas Guillem at 2025-02-01T12:26:27+00:00
opengl: fix chroma check from UpdateFormat()
The fmt passed to vlc_gl_interop_New() is const, the new changed chroma
is in interop->fmt_in.
This fixes crashes and assert after vd->ops->update_format() that
required a chroma change.
PS: if update_format() fails, a video converter will be inserted in the
static filter chain.
- - - - -
1 changed file:
- modules/video_output/opengl/vout_helper.c
Changes:
=====================================
modules/video_output/opengl/vout_helper.c
=====================================
@@ -328,20 +328,19 @@ int vout_display_opengl_UpdateFormat(vout_display_opengl_t *vgl,
const struct vlc_gl_api *api = &vgl->api;
assert(!fmt->p_palette);
- video_format_t in_fmt = *fmt;
- struct vlc_gl_interop *interop = vlc_gl_interop_New(gl, vctx, &in_fmt);
+ struct vlc_gl_interop *interop = vlc_gl_interop_New(gl, vctx, fmt);
if (!interop)
{
msg_Err(gl, "Could not create interop");
return VLC_EGENERIC;
}
- if ( !video_format_IsSameChroma( &in_fmt, fmt ) )
+ if ( !video_format_IsSameChroma( &interop->fmt_in, fmt ) )
{
msg_Warn(gl, "Could not update format, the interop changed the "
"requested chroma from %4.4s to %4.4s\n",
- (char *) &fmt->i_chroma, (char *) &in_fmt.i_chroma);
+ (char *) &fmt->i_chroma, (char *) &interop->fmt_in.i_chroma);
vlc_gl_interop_Delete(interop);
return VLC_EGENERIC;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f32d2d323f370d801c140560292993e335307b3e
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f32d2d323f370d801c140560292993e335307b3e
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