[vlc-devel] [PATCH 6/6] transcode: fix compilation on OS/2

Rémi Denis-Courmont remi at remlab.net
Sun Oct 11 19:07:59 CEST 2020


Le sunnuntaina 11. lokakuuta 2020, 14.00.57 EEST KO Myung-Hun a écrit :
> -----
>   CC      
> stream_out/transcode/libstream_out_transcode_plugin_la-transcode.lo In file
> included from f:/lang/gcc/usr/include/os2.h:39,
>                  from ../include/vlc_common.h:527,
>                  from stream_out/transcode/transcode.c:34:
> stream_out/transcode/transcode.c: In function 'SetVideoEncoderConfig':
> ../include/vlc_threads.h:102:37: error: missing binary operator before token
> "(" 102 |                                     MAKESHORT(PRTYD_MAXIMUM / 2,
> PRTYC_REGULAR)
>       |                                     ^~~~~~~~~
> 
> stream_out/transcode/transcode.c:329:5: note: in expansion of macro
> 'VLC_THREAD_PRIORITY_OUTPUT' 329 | #if VLC_THREAD_PRIORITY_OUTPUT !=
> VLC_THREAD_PRIORITY_VIDEO
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> -----
> ---
>  modules/stream_out/transcode/transcode.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/modules/stream_out/transcode/transcode.c
> b/modules/stream_out/transcode/transcode.c index 019deadc47..e0d2d1561b
> 100644
> --- a/modules/stream_out/transcode/transcode.c
> +++ b/modules/stream_out/transcode/transcode.c
> @@ -326,12 +326,9 @@ static void SetVideoEncoderConfig( sout_stream_t
> *p_stream, transcode_encoder_co p_cfg->video.threads.i_count =
> var_GetInteger( p_stream, SOUT_CFG_PREFIX "threads" );
> p_cfg->video.threads.pool_size = var_GetInteger( p_stream, SOUT_CFG_PREFIX
> "pool-size" );
> 
> -#if VLC_THREAD_PRIORITY_OUTPUT != VLC_THREAD_PRIORITY_VIDEO
> +    p_cfg->video.threads.i_priority = VLC_THREAD_PRIORITY_VIDEO;
>      if( var_GetBool( p_stream, SOUT_CFG_PREFIX "high-priority" ) )
>          p_cfg->video.threads.i_priority = VLC_THREAD_PRIORITY_OUTPUT;
> -    else
> -#endif
> -        p_cfg->video.threads.i_priority = VLC_THREAD_PRIORITY_VIDEO;
>  }

This causes var_GetBool() to be evaluated for no reasons whatsoever. Depending 
on the platform, it has either no effects, or it's just cargo cult.

> 
>  static void SetSPUEncoderConfig( sout_stream_t *p_stream,
> transcode_encoder_config_t *p_cfg )


-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list