summaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 11:24:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 14:56:43 +0200
commit1fc5d327e412983bc6e0ea5f65b2c5589e814b47 (patch)
tree081a1ff669ebc0b4d0d02e56627e0d45611e6555 /libavformat/mxfenc.c
parentdba7376d59d61c434b046ce9087368f71b60045d (diff)
avformat/(mpeg|mpegts|mxf|sup)enc: Use const uint8_t* to access pkt data
The packets muxers receive are not guaranteed to be writable, so they must not be modified. Ergo only access the packet's data via a const uint8_t*. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r--libavformat/mxfenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 7041659143..2d08dd6d40 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2806,8 +2806,8 @@ static void mxf_write_d10_audio_packet(AVFormatContext *s, AVStream *st, AVPacke
MXFContext *mxf = s->priv_data;
AVIOContext *pb = s->pb;
int frame_size = pkt->size / st->codecpar->block_align;
- uint8_t *samples = pkt->data;
- uint8_t *end = pkt->data + pkt->size;
+ const uint8_t *samples = pkt->data;
+ const uint8_t *const end = pkt->data + pkt->size;
int i;
klv_encode_ber4_length(pb, 4 + frame_size*4*8);