[vlc-devel] [PATCH 2/7] video_output: read the vd inside the display_lock

Steve Lhomme robux4 at ycbcr.xyz
Wed Oct 9 17:50:23 CEST 2019


On 2019-10-09 17:48, Thomas Guillem wrote:
> 
> 
> On Wed, Oct 9, 2019, at 17:36, Steve Lhomme wrote:
>> ---
>>   src/video_output/video_output.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/src/video_output/video_output.c
>> b/src/video_output/video_output.c
>> index a5046913867..df27a402b8b 100644
>> --- a/src/video_output/video_output.c
>> +++ b/src/video_output/video_output.c
>> @@ -1013,9 +1013,8 @@ static int
>> ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
>>       if (filtered->date != sys->displayed.current->date)
>>           msg_Warn(vout, "Unsupported timestamp modifications done by
>> chain_interactive");
>>   
>> -    vout_display_t *vd = sys->display;
>> -
>>       vlc_mutex_lock(&sys->display_lock);
>> +    vout_display_t *vd = sys->display;
>>   
> 
> It is not needed since this variable is set before the thread is created.

At the very least it's easier to read than wonder why this right exactly 
before a lock. Why make things more complicated to read ?

>>       /*
>>        * Get the subpicture to be displayed
>> -- 
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list