diff mbox series

[FFmpeg-devel,29/31] avcodec/tiff: Don't cast const away

Message ID AS8P250MB074454D8F0EF65F7321BEB9B8FEEA@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit e34d5d1e3b519290c5fc6c9b3226146096c42ae7
Headers show
Series [FFmpeg-devel,v2,01/22] fate/demux, lavf-container: Workaround for AV1-aspect ratio issue | expand

Commit Message

Andreas Rheinhardt Sept. 7, 2023, 2:03 p.m. UTC
lzma_stream.next_in is const for more than 15 years now
and has been so in every release of liblzma.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/tiff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Paul B Mahol Sept. 7, 2023, 5:58 p.m. UTC | #1
LGTM
diff mbox series

Patch

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 148964590b..adb49e4525 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -337,7 +337,7 @@  static void av_always_inline dng_blit(TiffContext *s, uint8_t *dst, int dst_stri
            (split vertically in the middle). */
         for (line = 0; line < height / 2; line++) {
             uint16_t *dst_u16 = (uint16_t *)dst;
-            uint16_t *src_u16 = (uint16_t *)src;
+            const uint16_t *src_u16 = (const uint16_t *)src;
 
             /* Blit first half of input row row to initial row of output */
             for (col = 0; col < width; col++)
@@ -360,7 +360,7 @@  static void av_always_inline dng_blit(TiffContext *s, uint8_t *dst, int dst_stri
         if (is_u16) {
             for (line = 0; line < height; line++) {
                 uint16_t *dst_u16 = (uint16_t *)dst;
-                uint16_t *src_u16 = (uint16_t *)src;
+                const uint16_t *src_u16 = (const uint16_t *)src;
 
                 for (col = 0; col < width; col++)
                     *dst_u16++ = dng_process_color16(*src_u16++, s->dng_lut,
@@ -570,7 +570,7 @@  static int tiff_uncompress_lzma(uint8_t *dst, uint64_t *len, const uint8_t *src,
     lzma_stream stream = LZMA_STREAM_INIT;
     lzma_ret ret;
 
-    stream.next_in   = (uint8_t *)src;
+    stream.next_in   = src;
     stream.avail_in  = size;
     stream.next_out  = dst;
     stream.avail_out = *len;