summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-07 13:42:25 -0600
committerDudemanguy <random342@airmail.cc>2024-03-07 22:03:55 +0000
commit62b1bad755bb6141c5a704741bda8a4da6dfcde5 (patch)
treee9c61825823384bf0dd01e26fd471093ace57626
parent68fbdc88d27c81e1bc6c7a68647fd8a970283423 (diff)
downloadmpv-62b1bad755bb6141c5a704741bda8a4da6dfcde5.tar.bz2
mpv-62b1bad755bb6141c5a704741bda8a4da6dfcde5.tar.xz
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: https://github.com/FFmpeg/FFmpeg/commit/2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5
-rw-r--r--audio/decode/ad_spdif.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c
index f3dca7d175..ac6e0123ca 100644
--- a/audio/decode/ad_spdif.c
+++ b/audio/decode/ad_spdif.c
@@ -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;