aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dca_xll.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 11:38:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 15:03:53 +0200
commit88f9b1fc4546e430a7fcaf6f5f629c1e4b7fe7e0 (patch)
tree30b00629853e7ce9bf32d9437c1f16506b383d06 /libavcodec/dca_xll.c
parent1fc5d327e412983bc6e0ea5f65b2c5589e814b47 (diff)
downloadffmpeg-88f9b1fc4546e430a7fcaf6f5f629c1e4b7fe7e0.tar.gz
avcodec/dcadec: Treat the input packet's data as const
A decoder's input packet need not be writable, so we must not modify the data. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r--libavcodec/dca_xll.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index aaccb7a43d..17626b3614 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -1040,7 +1040,7 @@ static int parse_band_data(DCAXllDecoder *s)
return 0;
}
-static int parse_frame(DCAXllDecoder *s, uint8_t *data, int size, DCAExssAsset *asset)
+static int parse_frame(DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
{
int ret;
@@ -1067,7 +1067,7 @@ static void clear_pbr(DCAXllDecoder *s)
s->pbr_delay = 0;
}
-static int copy_to_pbr(DCAXllDecoder *s, uint8_t *data, int size, int delay)
+static int copy_to_pbr(DCAXllDecoder *s, const uint8_t *data, int size, int delay)
{
if (size > DCA_XLL_PBR_BUFFER_MAX)
return AVERROR(ENOSPC);
@@ -1081,7 +1081,7 @@ static int copy_to_pbr(DCAXllDecoder *s, uint8_t *data, int size, int delay)
return 0;
}
-static int parse_frame_no_pbr(DCAXllDecoder *s, uint8_t *data, int size, DCAExssAsset *asset)
+static int parse_frame_no_pbr(DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
{
int ret = parse_frame(s, data, size, asset);
@@ -1119,7 +1119,7 @@ static int parse_frame_no_pbr(DCAXllDecoder *s, uint8_t *data, int size, DCAExss
return 0;
}
-static int parse_frame_pbr(DCAXllDecoder *s, uint8_t *data, int size, DCAExssAsset *asset)
+static int parse_frame_pbr(DCAXllDecoder *s, const uint8_t *data, int size, DCAExssAsset *asset)
{
int ret;
@@ -1160,7 +1160,7 @@ fail:
return ret;
}
-int ff_dca_xll_parse(DCAXllDecoder *s, uint8_t *data, DCAExssAsset *asset)
+int ff_dca_xll_parse(DCAXllDecoder *s, const uint8_t *data, DCAExssAsset *asset)
{
int ret;