]> git.sesse.net Git - vlc/commitdiff
avcodec: constify decoder_sys_t.p_codec
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 11 Sep 2014 20:16:50 +0000 (23:16 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 11 Sep 2014 20:16:50 +0000 (23:16 +0300)
modules/codec/avcodec/audio.c
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/subtitle.c
modules/codec/avcodec/video.c

index ee582b5544b360375ef2db465dd99317f407e7b6..f9c430e81acdcf495993d4ea8f877d222247dbe9 100644 (file)
@@ -236,7 +236,7 @@ static int GetAudioBuf( AVCodecContext *ctx, AVFrame *buf )
  * The avcodec codec will be opened, some memory allocated.
  *****************************************************************************/
 int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
-                  AVCodec *p_codec, int i_codec_id, const char *psz_namecodec )
+                  const AVCodec *p_codec, int i_codec_id, const char *psz_namecodec )
 {
     decoder_sys_t *p_sys;
 
index 51ad5fbfe73ded68f3c86caccecfc8dd52ac7ad2..eb13d9c12e7f934434fe0feeaa6fabb5a6b6023c 100644 (file)
@@ -252,7 +252,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     const char *psz_namecodec;
 
     AVCodecContext *p_context = NULL;
-    AVCodec        *p_codec = NULL;
+    const AVCodec  *p_codec = NULL;
 
     /* *** determine codec type *** */
     if( !GetFfmpegCodec( p_dec->fmt_in.i_codec, &i_cat, &i_codec_id,
index 44302d0b0baca4c46c92c0cccb0058c74a443b54..b5e80bda8d31528f21ad09f46ae04c6ef08ef3d2 100644 (file)
@@ -45,16 +45,16 @@ void CloseDeinterlace( vlc_object_t * );
 
 /* Video Decoder */
 int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
-                  AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
+                  const AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
 void EndVideoDec( decoder_t *p_dec );
 
 /* Audio Decoder */
 int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
-                  AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
+                  const AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
 
 /* Subtitle Decoder */
 int InitSubtitleDec( decoder_t *p_dec, AVCodecContext *p_context,
-                     AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
+                     const AVCodec *p_codec, int i_codec_id, const char *psz_namecodec );
 
 /* Initialize decoder */
 int ffmpeg_OpenCodec( decoder_t *p_dec );
@@ -246,7 +246,7 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
     int i_codec_id;             \
     const char *psz_namecodec;  \
     AVCodecContext *p_context;  \
-    AVCodec        *p_codec;    \
+    const AVCodec  *p_codec;    \
     bool b_delayed_open;
 
 #ifndef AV_VERSION_INT
index b5bd1ddcbf65fe21b6bad8e3374704bcd4665fb1..e69b4ee2346ea24290ce0855434b74156119b9e6 100644 (file)
@@ -50,7 +50,7 @@ static subpicture_t *DecodeSubtitle(decoder_t *, block_t **);
  * Initialize subtitle decoder
  */
 int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
-                    AVCodec *codec, int codec_id, const char *namecodec)
+                    const AVCodec *codec, int codec_id, const char *namecodec)
 {
     decoder_sys_t *sys;
 
index e43c13e35695c69d480e751c819792f86ba57ce8..329b169fa26e186e6f0ce259cc09cec66a2b3aac 100644 (file)
@@ -258,7 +258,7 @@ static int OpenVideoCodec( decoder_t *p_dec )
  * opened (done after the first decoded frame).
  *****************************************************************************/
 int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
-                  AVCodec *p_codec, int i_codec_id, const char *psz_namecodec )
+                  const AVCodec *p_codec, int i_codec_id, const char *psz_namecodec )
 {
     decoder_sys_t *p_sys;
     int i_val;