summaryrefslogtreecommitdiff
path: root/libavformat/oggenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-04 18:08:14 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-09 19:37:53 +0200
commitd5a0eba8a2481711e708442bcc1d14bf16e9d20b (patch)
tree56a13a62e6bd34e5a446f7d7a45dcc3ee6d246ba /libavformat/oggenc.c
parent417554bdd6da58ec473096494618a22f7ac49b11 (diff)
downloadffmpeg-d5a0eba8a2481711e708442bcc1d14bf16e9d20b.tar.gz
av(format|device): Add const to muxer packet data pointers
The packets given to muxers 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 'libavformat/oggenc.c')
-rw-r--r--libavformat/oggenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 016047f616..ae0705ba54 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -197,13 +197,13 @@ static int ogg_buffer_page(AVFormatContext *s, OGGStreamContext *oggstream)
}
static int ogg_buffer_data(AVFormatContext *s, AVStream *st,
- uint8_t *data, unsigned size, int64_t granule,
+ const uint8_t *data, unsigned size, int64_t granule,
int header)
{
OGGStreamContext *oggstream = st->priv_data;
OGGContext *ogg = s->priv_data;
int total_segments = size / 255 + 1;
- uint8_t *p = data;
+ const uint8_t *p = data;
int i, segments, len, flush = 0;
// Handles VFR by flushing page because this frame needs to have a timestamp