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

Rémi Denis-Courmont remi at remlab.net
Mon Mar 30 15:21:57 CEST 2020


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.

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/





More information about the vlc-devel mailing list