[vlc-devel] [PATCH 09/18] adaptive:fakeES: initialize the ES from the source category
robux4 at gmail.com
Sun Jul 9 10:16:55 CEST 2017
On Sun, Jul 9, 2017 at 9:59 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 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
>> 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.
I did *not* say this is right. It's just a different issue to address.
Calling es_format_Copy() alone should be sufficient. It does not use
any of the source data. So it's fine on uninitialized data. It's not
on initialized data as it needs to be cleaned beforehand. So I guess
the es_format_Init() can be dropped in both instances.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel