aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/smoothstreamingenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-06 20:30:08 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-10 22:55:42 +0200
commit2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5 (patch)
tree0603f863c7490e48e0c1dcd0f86b5b8480cce31d /libavformat/smoothstreamingenc.c
parente8704a8f60041abb84585efaf3223abf0b6dcb90 (diff)
downloadffmpeg-2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5.tar.gz
avformat/avio: Constify data pointees of write callbacks
They are currently non-const for reasons unknown, although avio_write() accepts a const buffer. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/smoothstreamingenc.c')
-rw-r--r--libavformat/smoothstreamingenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 3c050ca54e..0379e9a079 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -75,7 +75,11 @@ typedef struct SmoothStreamingContext {
int nb_fragments;
} SmoothStreamingContext;
+#if FF_API_AVIO_WRITE_NONCONST
static int ism_write(void *opaque, uint8_t *buf, int buf_size)
+#else
+static int ism_write(void *opaque, const uint8_t *buf, int buf_size)
+#endif
{
OutputStream *os = opaque;
if (os->out)