[vlc-devel] [PATCH 09/18] adaptive:fakeES: initialize the ES from the source category

Rémi Denis-Courmont remi at remlab.net
Sun Jul 9 09:59:48 CEST 2017


Le sunnuntaina 9. heinäkuuta 2017, 8.20.54 EEST Steve Lhomme a écrit :
> On Sat, Jul 8, 2017 at 9:02 PM, Francois Cartegnie <fcvlcdev at free.fr> wrote:
> > Le 08/07/2017 à 19:21, Rémi Denis-Courmont a écrit :
> >>>> _______________________________________________
> >>>> vlc-devel mailing list
> >>>> To unsubscribe or modify your subscription options:
> >>>> https://mailman.videolan.org/listinfo/vlc-devel
> >>> 
> >>> That's it, I explained why 0 is not a good value.
> >>> _______________________________________________
> >>> vlc-devel mailing list
> >>> To unsubscribe or modify your subscription options:
> >>> https://mailman.videolan.org/listinfo/vlc-devel
> >> 
> >> What does that have to do with my comment about the call being entirely
> >> useless ?> 
> > What's the problem with using proper initializers, even
> > if they currently do nothing ?
> 
> This patches (and another similar one) address the typing/values
> consistency, not the design of the whole thing.
> 
> If you wanna go down that road there are other places where the init
> is done and a copy done afterwards (es_format_InitFromVideo for
> example).
> 
> Initializing something with a value when you know it's wrong is not
> good coding practice.

But initializing an object and *not* making use of that initial value is *not* 
a good practice. Compilers warn against that even - if/when the optimizer 
detects it.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list