[vlc-devel] [PATCH 02/15] display: only pass the vout_display_priv_t to vout_display_start()

Steve Lhomme robux4 at ycbcr.xyz
Thu Sep 3 10:16:32 CEST 2020


>> +static int vout_display_start(void *func, bool forced, va_list ap)
>> +{
>> +    vout_display_open_cb activate = func;
>> +    vout_display_priv_t *osys = va_arg(ap, vout_display_priv_t *);
>> +    const vout_display_cfg_t *cfg = &osys->cfg;
>> +    vout_display_t *vd = &osys->display;
>> +    vlc_video_context *context = osys->src_vctx;
>> +
>> +    /* Picture buffer does not have the concept of aspect ratio */
>> +    video_format_Copy(&vd->fmt, &vd->source);
>> +    vd->fmt.i_sar_num = 0;
>> +    vd->fmt.i_sar_den = 0;
>> +    vd->obj.force = forced; /* TODO: pass to activate() instead? */
>> +
>> +    int ret = activate(vd, cfg, &vd->fmt, context);
>> +    if (ret != VLC_SUCCESS) {
>> +        video_format_Clean(&vd->fmt);
>> +        vlc_objres_clear(VLC_OBJECT(vd));
>> +    }
>> +    return ret;
>> +}
> 
> Could you split the move for better readability?

I can


More information about the vlc-devel mailing list