ad_spdif: handle const buf pointee in avio_alloc_context

ffmpeg recently changed this field to be const which causes our CI to
fail on newer versions.

See: 2a68d945cd
This commit is contained in:
Dudemanguy 2024-03-07 13:42:25 -06:00
parent 68fbdc88d2
commit 62b1bad755
1 changed files with 4 additions and 0 deletions

View File

@ -59,7 +59,11 @@ struct spdifContext {
struct mp_decoder public;
};
#if LIBAVCODEC_VERSION_MAJOR < 61
static int write_packet(void *p, uint8_t *buf, int buf_size)
#else
static int write_packet(void *p, const uint8_t *buf, int buf_size)
#endif
{
struct spdifContext *ctx = p;