[vlc-devel] [PATCH 1/2] posix/thread: dont try to read nonexistent variable

Marvin Scholz epirat07 at gmail.com
Mon Mar 30 16:31:42 CEST 2020



On 30 Mar 2020, at 15:21, Rémi Denis-Courmont wrote:

> Le maanantaina 30. maaliskuuta 2020, 15.37.03 EEST Marvin Scholz a 
> écrit :
>> When LIBVLC_USE_PTHREAD is not defined, there is no 'rt-priority' 
>> var,
>> so do not try to read it in that case.
>> ---
>>  src/posix/thread.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/src/posix/thread.c b/src/posix/thread.c
>> index e34725c7f1..57fb13fd8a 100644
>> --- a/src/posix/thread.c
>> +++ b/src/posix/thread.c
>> @@ -172,11 +172,15 @@ void vlc_threads_setup (libvlc_int_t *p_libvlc)
>>       * just once per process. */
>>      if (!initialized)
>>      {
>> +#if defined (LIBVLC_USE_PTHREAD)
>
> This does not make much sense in a file literally called 
> "posix/thread.c", and
> it's not even consistent with the rest of the code.
>

Indeed, I’ll wait for the outcome of your other patch and then send a 
new version
of this.

> Though I never understood how VLC can run in RT. Probably it can't.
>
>>          if (var_InheritBool (p_libvlc, "rt-priority"))
>>          {
>>              rt_offset = var_InheritInteger (p_libvlc, "rt-offset");
>>              rt_priorities = true;
>>          }
>> +#else
>> +        (void)rt_priorities; (void)rt_offset; (void)p_libvlc;
>> +#endif
>>          initialized = true;
>>      }
>>      vlc_mutex_unlock (&lock);
>
>
> -- 
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> 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