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>
This commit is contained in:
Andreas Rheinhardt
2023-09-06 20:30:08 +02:00
parent e8704a8f60
commit 2a68d945cd
10 changed files with 71 additions and 1 deletions

View File

@@ -89,7 +89,11 @@ void ffio_init_context(FFIOContext *s,
int write_flag,
void *opaque,
int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
#if FF_API_AVIO_WRITE_NONCONST
int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
#else
int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size),
#endif
int64_t (*seek)(void *opaque, int64_t offset, int whence));
/**