diff mbox series

[FFmpeg-devel,v4,7/8] avpriv_find_start_code(): constify pointer parameters

Message ID 20220916182002.122699-8-scott.the.elm@gmail.com
State New
Headers show
Series rewrite avpriv_find_start_code() for clarity | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Scott Theisen Sept. 16, 2022, 6:20 p.m. UTC
Have the compiler enforce not changing the addresses these parameters point to.

No functional change.
---
 libavcodec/utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 63bf4b8cb7..0635c5dcaa 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -980,8 +980,8 @@  void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, in
 #endif
 
 const uint8_t *avpriv_find_start_code(const uint8_t *av_restrict p,
-                                      const uint8_t *end,
-                                      uint32_t *av_restrict start_code)
+                                      const uint8_t * const end,
+                                      uint32_t * const av_restrict start_code)
 {
     av_assert0(p <= end);
     if (p >= end)