diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-04 11:24:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-04 14:56:43 +0200 |
commit | 1fc5d327e412983bc6e0ea5f65b2c5589e814b47 (patch) | |
tree | 081a1ff669ebc0b4d0d02e56627e0d45611e6555 /libavformat/mpegtsenc.c | |
parent | dba7376d59d61c434b046ce9087368f71b60045d (diff) | |
download | ffmpeg-1fc5d327e412983bc6e0ea5f65b2c5589e814b47.tar.gz |
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/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 18e8f7e45f..c964d58c8e 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1836,7 +1836,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) { AVStream *st = s->streams[pkt->stream_index]; int size = pkt->size; - uint8_t *buf = pkt->data; + const uint8_t *buf = pkt->data; uint8_t *data = NULL; MpegTSWrite *ts = s->priv_data; MpegTSWriteStream *ts_st = st->priv_data; |