Skip to content
Snippets Groups Projects
Commit dc8f95ec authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont Committed by Hugo Beauzée-Luyssen
Browse files

drm: initialise sys explicitly

parent 743fa40a
No related branches found
No related tags found
1 merge request!1640drm: fix pixel format selection
......@@ -152,7 +152,6 @@ static int Open(vout_display_t *vd,
video_format_t *fmtp, vlc_video_context *context)
{
vout_window_t *wnd = vd->cfg->window;
vout_display_sys_t *sys;
uint_fast32_t drm_fourcc = 0;
video_format_t fmt;
......@@ -162,8 +161,8 @@ static int Open(vout_display_t *vd,
/*
* Allocate instance and initialize some members
*/
vd->sys = sys = vlc_obj_calloc(VLC_OBJECT(vd), 1, sizeof(*sys));
if (!sys)
vout_display_sys_t *sys = vlc_obj_malloc(VLC_OBJECT(vd), sizeof (*sys));
if (unlikely(sys == NULL))
return VLC_ENOMEM;
char *chroma = var_InheritString(vd, "kms-drm-chroma");
......@@ -226,7 +225,9 @@ static int Open(vout_display_t *vd,
}
}
sys->front_buf = 0;
*fmtp = fmt;
vd->sys = sys;
vd->ops = &ops;
(void) context;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment