[vlc-devel] [PATCH 2/9] video_output: simplify the locking of the display in vout_UpdateWindowSizeLocked

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 11 09:15:32 CEST 2019


On 2019-10-11 9:02, Thomas Guillem wrote:
> 
> On Fri, Oct 11, 2019, at 08:50, Steve Lhomme wrote:
>> On 2019-10-10 18:26, Rémi Denis-Courmont wrote:
>>> Le torstaina 10. lokakuuta 2019, 18.32.34 EEST Thomas Guillem a écrit :
>>>> It is just a question of taste. The actual code is OK to me.
>>>>
>>>> When I develop, I tend to do like this current code instead of creating an
>>>> extra variable.
>>>>
>>>> I have nothing about this way or another but I don't think this commit is
>>>> really needed.
>>>
>>> I dislike both ways, but I can't really think of a third option.
>>
>> I prefer balanced locks. It's easier to read and less prone to mistakes.
>> In a small function like that it's easy to spot, but if it even grows
>> we're getting closer and closer to a possible issue.
>>
>> If there we kept the old value we used, we could tell if we really need
>> to send the message and save the extra bool (but then we need 2
>> unsigned). It may make sense to avoid sending unnecessary messages to
>> the window anyway.
> 
> I don't mind if you do that in any new code, but I don't like changing a perfectly fine code for personal taste (if it's not accepted by everyone).
> There is a lot of code in VLC where I don't like the coding style, but I keep it that way in order to not create too much git noise.

And that's why we keep carrying this huge technical debt.


More information about the vlc-devel mailing list