[vlc-devel] commit: avcodec: use cast to avoid warning about this const. It' s a rare case where we use a dummy empty palette that won' t change and we don't want to recreate it every time either. ( Derk-Jan Hartman )

git version control git at videolan.org
Sun Aug 3 14:19:03 CEST 2008


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Sun Aug  3 14:19:37 2008 +0200| [feb1ec093a7be171439733cd7a8c3416131236f0] | committer: Derk-Jan Hartman 

avcodec: use cast to avoid warning about this const. It's a rare case where we use a dummy empty palette that won't change and we don't want to recreate it every time either.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=feb1ec093a7be171439733cd7a8c3416131236f0
---

 modules/codec/avcodec/video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 5713154..22af7fd 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -337,7 +337,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
         p_sys->p_context->palctrl =
             (AVPaletteControl *)p_dec->fmt_in.video.p_palette;
     else if( p_sys->i_codec_id != CODEC_ID_MSVIDEO1 && p_sys->i_codec_id != CODEC_ID_CINEPAK )
-        p_sys->p_context->palctrl = &palette_control;
+        p_sys->p_context->palctrl = (AVPaletteControl *) &palette_control;
 
     /* ***** Open the codec ***** */
     vlc_mutex_t *lock = var_AcquireMutex( "avcodec" );




More information about the vlc-devel mailing list