[vlc-devel] [PATCH] display: do not set default values to 0 when creating the vout_display_t

Rémi Denis-Courmont remi at remlab.net
Fri Aug 11 13:19:06 CEST 2017


Le 11 août 2017 12:56:27 GMT+03:00, Steve Lhomme <robux4 at videolabs.io> a écrit :
>They are already memset() in vlc_custom_create().
>That will avoid a warning on vd->manage
>---
> src/video_output/display.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
>diff --git a/src/video_output/display.c b/src/video_output/display.c
>index c2499d3eb0..50a7845e90 100644
>--- a/src/video_output/display.c
>+++ b/src/video_output/display.c
>@@ -90,19 +90,7 @@ static vout_display_t *vout_display_New(vlc_object_t
>*obj,
>     vd->fmt.i_sar_num = 0;
>     vd->fmt.i_sar_den = 0;
> 
>-    vd->info.is_slow = false;
>-    vd->info.has_double_click = false;
>-    vd->info.needs_hide_mouse = false;
>-    vd->info.has_pictures_invalid = false;
>-    vd->info.subpicture_chromas = NULL;
>-
>     vd->cfg = cfg;
>-    vd->pool = NULL;
>-    vd->prepare = NULL;
>-    vd->display = NULL;
>-    vd->control = NULL;
>-    vd->manage = NULL;
>-    vd->sys = NULL;
> 
>     vd->owner = *owner;
> 
>-- 
>2.12.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

ISO does not warrant that zeroes represent NULL pointers, only zero integers, false booleans and if adequate macro is predefined, zero floating and complex numbers, though.

As regards deprecated stuff, we could try something like libav - only setting the attribute outside LibVLC core.
-- 
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170811/433fd5a6/attachment.html>


More information about the vlc-devel mailing list