Passing const cfg pointer to vpx_codec_{dec,enc}_init_ver().
authorDmitry Kovalev <dkovalev@google.com>
Mon, 25 Aug 2014 21:02:53 +0000 (14:02 -0700)
committerDmitry Kovalev <dkovalev@google.com>
Mon, 25 Aug 2014 21:08:14 +0000 (14:08 -0700)
Change-Id: I3e319f581215ccb814afca247c1d911be231a4ac

vpx/src/vpx_decoder.c
vpx/src/vpx_encoder.c
vpx/vpx_codec.h
vpx/vpx_decoder.h
vpx/vpx_encoder.h

index b19c440..fdcc9c1 100644 (file)
@@ -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;
index 5773455..736a8da 100644 (file)
@@ -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;
index 07df72a..91fc532 100644 (file)
@@ -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;
index 10b89fa..62fd919 100644 (file)
@@ -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);
 
index 58acf18..75d3a47 100644 (file)
@@ -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);