From: Dmitry Kovalev Date: Mon, 25 Aug 2014 21:02:53 +0000 (-0700) Subject: Passing const cfg pointer to vpx_codec_{dec,enc}_init_ver(). X-Git-Tag: v1.4.0~921^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=446096571990a1f0db0545e156bc4ca1b2df92e0;p=libvpx Passing const cfg pointer to vpx_codec_{dec,enc}_init_ver(). Change-Id: I3e319f581215ccb814afca247c1d911be231a4ac --- diff --git a/vpx/src/vpx_decoder.c b/vpx/src/vpx_decoder.c index b19c4409f..fdcc9c1b1 100644 --- a/vpx/src/vpx_decoder.c +++ b/vpx/src/vpx_decoder.c @@ -20,7 +20,7 @@ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, - vpx_codec_dec_cfg_t *cfg, + const vpx_codec_dec_cfg_t *cfg, vpx_codec_flags_t flags, int ver) { vpx_codec_err_t res; diff --git a/vpx/src/vpx_encoder.c b/vpx/src/vpx_encoder.c index 577345535..736a8daa2 100644 --- a/vpx/src/vpx_encoder.c +++ b/vpx/src/vpx_encoder.c @@ -22,7 +22,7 @@ vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *cfg, + const vpx_codec_enc_cfg_t *cfg, vpx_codec_flags_t flags, int ver) { vpx_codec_err_t res; diff --git a/vpx/vpx_codec.h b/vpx/vpx_codec.h index 07df72a78..91fc532b5 100644 --- a/vpx/vpx_codec.h +++ b/vpx/vpx_codec.h @@ -203,9 +203,11 @@ extern "C" { const char *err_detail; /**< Detailed info, if available */ vpx_codec_flags_t init_flags; /**< Flags passed at init time */ union { - struct vpx_codec_dec_cfg *dec; /**< Decoder Configuration Pointer */ - struct vpx_codec_enc_cfg *enc; /**< Encoder Configuration Pointer */ - void *raw; + /**< Decoder Configuration Pointer */ + const struct vpx_codec_dec_cfg *dec; + /**< Encoder Configuration Pointer */ + const struct vpx_codec_enc_cfg *enc; + const void *raw; } config; /**< Configuration pointer aliasing union */ vpx_codec_priv_t *priv; /**< Algorithm private storage */ } vpx_codec_ctx_t; diff --git a/vpx/vpx_decoder.h b/vpx/vpx_decoder.h index 10b89fa0f..62fd91975 100644 --- a/vpx/vpx_decoder.h +++ b/vpx/vpx_decoder.h @@ -135,7 +135,7 @@ extern "C" { */ vpx_codec_err_t vpx_codec_dec_init_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, - vpx_codec_dec_cfg_t *cfg, + const vpx_codec_dec_cfg_t *cfg, vpx_codec_flags_t flags, int ver); diff --git a/vpx/vpx_encoder.h b/vpx/vpx_encoder.h index 58acf18a8..75d3a47b1 100644 --- a/vpx/vpx_encoder.h +++ b/vpx/vpx_encoder.h @@ -715,7 +715,7 @@ extern "C" { */ vpx_codec_err_t vpx_codec_enc_init_ver(vpx_codec_ctx_t *ctx, vpx_codec_iface_t *iface, - vpx_codec_enc_cfg_t *cfg, + const vpx_codec_enc_cfg_t *cfg, vpx_codec_flags_t flags, int ver);