[FFmpeg-cvslog] avcodec/mpegvideo_enc: Constify pointers to static storage

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:01:36 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 15 10:08:49 2024 +0200| [390dbcb8b8d69a8f10362c58a7bafbfa51eb7148] | committer: Andreas Rheinhardt

avcodec/mpegvideo_enc: Constify pointers to static storage

These must not be modified (even when they are initialized at runtime
and therefore modifiable).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=390dbcb8b8d69a8f10362c58a7bafbfa51eb7148
---

 libavcodec/mpegvideo_enc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index abeb235277..620ca08869 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -3914,8 +3914,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
     int coeff_count[64];
     int qmul, qadd, start_i, last_non_zero, i, dc;
     const int esc_length= s->ac_esc_length;
-    uint8_t * length;
-    uint8_t * last_length;
+    const uint8_t *length, *last_length;
     const int lambda= s->lambda2 >> (FF_LAMBDA_SHIFT - 6);
     int mpeg2_qscale;
 



More information about the ffmpeg-cvslog mailing list