From: Laurent Aimar Date: Sat, 6 Jun 2009 13:51:26 +0000 (+0200) Subject: Added a missing const to video_format_Copy. X-Git-Tag: 1.1.0-ff~5550 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a65e5abc5bb148264ccfb3323ac6a94d8ea0351d;p=vlc Added a missing const to video_format_Copy. --- diff --git a/include/vlc_es.h b/include/vlc_es.h index 7c5846f878..3a98214e26 100644 --- a/include/vlc_es.h +++ b/include/vlc_es.h @@ -147,15 +147,15 @@ static inline void video_format_Init( video_format_t *p_src, vlc_fourcc_t i_chro * \param p_dst video_format_t to copy to * \param p_src video_format_t to copy from */ -static inline int video_format_Copy( video_format_t *p_dst, video_format_t *p_src ) +static inline int video_format_Copy( video_format_t *p_dst, const video_format_t *p_src ) { - memcpy( p_dst, p_src, sizeof( video_format_t ) ); + memcpy( p_dst, p_src, sizeof( *p_dst ) ); if( p_src->p_palette ) { p_dst->p_palette = (video_palette_t *) malloc( sizeof( video_palette_t ) ); if( !p_dst->p_palette ) return VLC_ENOMEM; - memcpy( p_dst->p_palette, p_src->p_palette, sizeof( video_palette_t ) ); + memcpy( p_dst->p_palette, p_src->p_palette, sizeof( *p_dst->p_palette ) ); } return VLC_SUCCESS; };