[vlc-devel] [PATCH 5/7] vlc_fourcc: add a macro to get the string for a FOURCC

Rémi Denis-Courmont remi at remlab.net
Fri May 12 16:31:37 CEST 2017


Le torstaina 11. toukokuuta 2017, 9.36.07 EEST Steve Lhomme a écrit :
> ---
>  include/vlc_fourcc.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
> index b950b0622b..d6a2c5085e 100644
> --- a/include/vlc_fourcc.h
> +++ b/include/vlc_fourcc.h
> @@ -24,6 +24,8 @@
>  #ifndef VLC_FOURCC_H
>  #define VLC_FOURCC_H 1
> 
> +#define FOURCC_STR(fc) ((const char *)&(fc))
> +
>  /* Video codec */
>  #define VLC_CODEC_MPGV            VLC_FOURCC('m','p','g','v')
>  #define VLC_CODEC_MP4V            VLC_FOURCC('m','p','4','v')

This is hugely misleading as the result is not nul-terminated. Nack.

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



More information about the vlc-devel mailing list