[vlc-devel] [vlc-commits] Kill a deprecation warning

Rafaël Carré funman at videolan.org
Tue Oct 9 15:23:03 CEST 2012


Le 09/10/2012 15:20, Jean-Baptiste Kempf a écrit :
> vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Oct  9 15:15:10 2012 +0200| [7fa3799ae26ecd476d0e8fc9a0fdfd627f6e6f34] | committer: Jean-Baptiste Kempf
> 
> Kill a deprecation warning
> 
> Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7fa3799ae26ecd476d0e8fc9a0fdfd627f6e6f34
> ---
> 
>  modules/codec/avcodec/avcodec.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
> index 0349d31..2cd356e 100644
> --- a/modules/codec/avcodec/avcodec.c
> +++ b/modules/codec/avcodec/avcodec.c
> @@ -328,9 +328,12 @@ static int OpenDecoder( vlc_object_t *p_this )
>          return VLC_ENOMEM;
>      p_context->debug = var_InheritInteger( p_dec, "avcodec-debug" );
>      p_context->opaque = (void *)p_this;
> -    p_context->dsp_mask = GetVlcDspMask(); /* set CPU capabilities */
> +
> +    /* set CPU capabilities */
>  #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT( 51, 25, 0 )
> -    av_set_cpu_flags_mask( INT_MAX & ~p_context->dsp_mask );
> +    av_set_cpu_flags_mask( INT_MAX & ~GetVlcDspMask() );

I think the "INT_MAX &" is not needed, it's gonna be 0x7ffffffff anyway.

Unless for some reason we want to unset the top bit?

> +#else
> +    p_context->dsp_mask = GetVlcDspMask();
>  #endif
>  
>      p_dec->b_need_packetized = true;



More information about the vlc-devel mailing list