[vlc-commits] codec: hxxx_helper: use const when possible

Thomas Guillem git at videolan.org
Mon Sep 11 16:19:20 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Sep 11 15:46:48 2017 +0200| [1eb8728aed65193dd9341cebe22508b4335b16c6] | committer: Thomas Guillem

codec: hxxx_helper: use const when possible

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

 modules/codec/hxxx_helper.c | 14 +++++++-------
 modules/codec/hxxx_helper.h | 10 +++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/codec/hxxx_helper.c b/modules/codec/hxxx_helper.c
index f9df9ca20d..f8f2872423 100644
--- a/modules/codec/hxxx_helper.c
+++ b/modules/codec/hxxx_helper.c
@@ -477,7 +477,7 @@ hxxx_helper_set_extra(struct hxxx_helper *hh, const void *p_extra,
 
 
 block_t *
-h264_helper_get_annexb_config(struct hxxx_helper *hh)
+h264_helper_get_annexb_config(const struct hxxx_helper *hh)
 {
     static const uint8_t annexb_startcode[] = { 0x00, 0x00, 0x00, 0x01 };
 
@@ -527,7 +527,7 @@ h264_helper_get_annexb_config(struct hxxx_helper *hh)
 }
 
 block_t *
-h264_helper_get_avcc_config(struct hxxx_helper *hh)
+h264_helper_get_avcc_config(const struct hxxx_helper *hh)
 {
     const struct hxxx_helper_nal *p_nal;
     size_t i = 0;
@@ -556,7 +556,7 @@ h264_helper_get_avcc_config(struct hxxx_helper *hh)
 }
 
 static const struct hxxx_helper_nal *
-h264_helper_get_current_sps(struct hxxx_helper *hh)
+h264_helper_get_current_sps(const struct hxxx_helper *hh)
 {
     if (hh->h264.i_sps_count == 0)
         return NULL;
@@ -568,7 +568,7 @@ h264_helper_get_current_sps(struct hxxx_helper *hh)
 }
 
 int
-h264_helper_get_current_picture_size(struct hxxx_helper *hh,
+h264_helper_get_current_picture_size(const struct hxxx_helper *hh,
                                      unsigned *p_w, unsigned *p_h,
                                      unsigned *p_vw, unsigned *p_vh)
 {
@@ -580,7 +580,7 @@ h264_helper_get_current_picture_size(struct hxxx_helper *hh,
 }
 
 int
-h264_helper_get_current_sar(struct hxxx_helper *hh, int *p_num, int *p_den)
+h264_helper_get_current_sar(const struct hxxx_helper *hh, int *p_num, int *p_den)
 {
     const struct hxxx_helper_nal *hsps = h264_helper_get_current_sps(hh);
     if (hsps == NULL)
@@ -591,8 +591,8 @@ h264_helper_get_current_sar(struct hxxx_helper *hh, int *p_num, int *p_den)
 }
 
 int
-h264_helper_get_current_dpb_values(struct hxxx_helper *hh,
-                                       uint8_t *p_depth, unsigned *p_delay)
+h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
+                                   uint8_t *p_depth, unsigned *p_delay)
 {
     const struct hxxx_helper_nal *hsps = h264_helper_get_current_sps(hh);
     if (hsps == NULL)
diff --git a/modules/codec/hxxx_helper.h b/modules/codec/hxxx_helper.h
index 44bb57a12d..7753048f7a 100644
--- a/modules/codec/hxxx_helper.h
+++ b/modules/codec/hxxx_helper.h
@@ -74,15 +74,15 @@ void hxxx_helper_clean(struct hxxx_helper *hh);
 int hxxx_helper_set_extra(struct hxxx_helper *hh, const void *p_extra,
                           size_t i_extra);
 
-block_t *h264_helper_get_annexb_config(struct hxxx_helper *hh);
+block_t *h264_helper_get_annexb_config(const struct hxxx_helper *hh);
 
-block_t *h264_helper_get_avcc_config(struct hxxx_helper *hh);
+block_t *h264_helper_get_avcc_config(const struct hxxx_helper *hh);
 
-int h264_helper_get_current_picture_size(struct hxxx_helper *hh,
+int h264_helper_get_current_picture_size(const struct hxxx_helper *hh,
                                          unsigned *p_w, unsigned *p_h,
                                          unsigned *p_vw, unsigned *p_vh);
 
-int h264_helper_get_current_sar(struct hxxx_helper *hh, int *p_num, int *p_den);
+int h264_helper_get_current_sar(const struct hxxx_helper *hh, int *p_num, int *p_den);
 
-int h264_helper_get_current_dpb_values(struct hxxx_helper *hh,
+int h264_helper_get_current_dpb_values(const struct hxxx_helper *hh,
                                        uint8_t *p_depth, unsigned *pi_delay);



More information about the vlc-commits mailing list