[vlc-devel] [PATCH] avcodec: encoder: fix warning on losing const attribute
Rémi Denis-Courmont
remi at remlab.net
Tue Jul 9 20:03:24 CEST 2019
Le tiistaina 9. heinäkuuta 2019, 15.31.37 EEST Steve Lhomme a écrit :
> ---
> modules/codec/avcodec/encoder.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/modules/codec/avcodec/encoder.c
> b/modules/codec/avcodec/encoder.c index cbac0d33948..5410ac7dc99 100644
> --- a/modules/codec/avcodec/encoder.c
> +++ b/modules/codec/avcodec/encoder.c
> @@ -580,8 +580,8 @@ int InitVideoEnc( vlc_object_t *p_this )
>
> if ( p_sys->b_mpeg4_matrix )
> {
> - p_context->intra_matrix = mpeg4_default_intra_matrix;
> - p_context->inter_matrix = mpeg4_default_non_intra_matrix;
> + p_context->intra_matrix = (uint16_t*)
> mpeg4_default_intra_matrix;
> + p_context->inter_matrix =
> (uint16_t*) mpeg4_default_non_intra_matrix; }
>
> if ( p_sys->b_pre_me )
This looks fishy. Either libavcodec should be fixed to use const, or the
matrices may be written to, and the assignment is wrong (a fortiori the cast).
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list