Commit d76d1a6d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

display: balance format init/clean

parent f4a5d339
......@@ -77,12 +77,14 @@ static int vout_display_start(void *func, va_list ap)
video_format_t *fmtp = va_arg(ap, video_format_t *);
vlc_video_context *context = va_arg(ap, vlc_video_context *);
video_format_Clean(fmtp);
video_format_Copy(fmtp, &vd->source);
fmtp->i_sar_num = 0;
fmtp->i_sar_den = 0;
return activate(vd, cfg, fmtp, context);
int ret = activate(vd, cfg, fmtp, context);
if (ret != VLC_SUCCESS)
video_format_Clean(fmtp);
return ret;
}
/**
......@@ -99,7 +101,6 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
/* */
video_format_Copy(&vd->source, fmt);
video_format_Init(&vd->fmt, 0);
/* Picture buffer does not have the concept of aspect ratio */
......@@ -130,6 +131,7 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
vout_window_SetSize(cfg->window,
cfg->display.width, cfg->display.height);
} else {
video_format_Copy(&vd->fmt, &vd->source);
vd->module = NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment