aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/webp.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 18:49:37 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-09 19:37:53 +0200
commit4ad686269d3025a2841b026a82bd26b6a0dd4a3f (patch)
tree080c22a05c1810fb7e12cceb3439395322468df3 /libavcodec/webp.c
parentd5a0eba8a2481711e708442bcc1d14bf16e9d20b (diff)
downloadffmpeg-4ad686269d3025a2841b026a82bd26b6a0dd4a3f.tar.gz
avcodec: Add const to decoder packet data pointers
The packets given to decoder need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/webp.c')
-rw-r--r--libavcodec/webp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index 1b5e943a6e..e57a5a2917 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -200,7 +200,7 @@ typedef struct WebPContext {
int has_alpha; /* has a separate alpha chunk */
enum AlphaCompression alpha_compression; /* compression type for alpha chunk */
enum AlphaFilter alpha_filter; /* filtering method for alpha chunk */
- uint8_t *alpha_data; /* alpha chunk data */
+ const uint8_t *alpha_data; /* alpha chunk data */
int alpha_data_size; /* alpha chunk data size */
int has_exif; /* set after an EXIF chunk has been processed */
int has_iccp; /* set after an ICCP chunk has been processed */
@@ -1084,7 +1084,7 @@ static void update_canvas_size(AVCodecContext *avctx, int w, int h)
}
static int vp8_lossless_decode_frame(AVCodecContext *avctx, AVFrame *p,
- int *got_frame, uint8_t *data_start,
+ int *got_frame, const uint8_t *data_start,
unsigned int data_size, int is_alpha_chunk)
{
WebPContext *s = avctx->priv_data;
@@ -1240,7 +1240,7 @@ static void alpha_inverse_prediction(AVFrame *frame, enum AlphaFilter m)
}
static int vp8_lossy_decode_alpha(AVCodecContext *avctx, AVFrame *p,
- uint8_t *data_start,
+ const uint8_t *data_start,
unsigned int data_size)
{
WebPContext *s = avctx->priv_data;