[vlc-commits] avcodec: constify decoder_sys_t.p_codec
Rémi Denis-Courmont
git at videolan.org
Thu Sep 11 22:38:35 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 11 23:16:50 2014 +0300| [e13caffb319f975a8e878b2500a71cbc53180c65] | committer: Rémi Denis-Courmont
avcodec: constify decoder_sys_t.p_codec
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e13caffb319f975a8e878b2500a71cbc53180c65
---
modules/codec/avcodec/audio.c | 2 +-
modules/codec/avcodec/avcodec.c | 2 +-
modules/codec/avcodec/avcodec.h | 8 ++++----
modules/codec/avcodec/subtitle.c | 2 +-
modules/codec/avcodec/video.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index ee582b5..f9c430e 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -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;
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 51ad5fb..eb13d9c 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -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,
diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h
index 44302d0..b5e80bd 100644
--- a/modules/codec/avcodec/avcodec.h
+++ b/modules/codec/avcodec/avcodec.h
@@ -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
diff --git a/modules/codec/avcodec/subtitle.c b/modules/codec/avcodec/subtitle.c
index b5bd1dd..e69b4ee 100644
--- a/modules/codec/avcodec/subtitle.c
+++ b/modules/codec/avcodec/subtitle.c
@@ -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;
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e43c13e..329b169 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -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;
More information about the vlc-commits
mailing list