summaryrefslogtreecommitdiff
path: root/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch')
-rw-r--r--media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch b/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch
new file mode 100644
index 000000000000..3ac8d9b7b8dc
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch
@@ -0,0 +1,45 @@
+https://github.com/mpv-player/mpv/pull/13659
+From: Dudemanguy <random342@airmail.cc>
+Date: Thu, 7 Mar 2024 13:42:25 -0600
+Subject: [PATCH 1/2] 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
+--- 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;
+
+
+From 7f9eabfb023611565db8b6cce9a3473a6eb6c731 Mon Sep 17 00:00:00 2001
+From: Dudemanguy <random342@airmail.cc>
+Date: Thu, 7 Mar 2024 14:12:15 -0600
+Subject: [PATCH 2/2] filters/f_lavfi: handle removed
+ AV_OPT_TYPE_CHANNEL_LAYOUT
+
+See: https://github.com/FFmpeg/FFmpeg/commit/65ddc74988245a01421a63c5cffa4d900c47117c
+--- a/filters/f_lavfi.c
++++ b/filters/f_lavfi.c
+@@ -1034,7 +1034,11 @@ static const char *get_avopt_type_name(enum AVOptionType type)
+ case AV_OPT_TYPE_VIDEO_RATE: return "fps";
+ case AV_OPT_TYPE_DURATION: return "duration";
+ case AV_OPT_TYPE_COLOR: return "color";
++#if LIBAVUTIL_VERSION_MAJOR < 59
+ case AV_OPT_TYPE_CHANNEL_LAYOUT: return "channellayout";
++#else
++ case AV_OPT_TYPE_CHLAYOUT: return "channellayout";
++#endif
+ case AV_OPT_TYPE_BOOL: return "bool";
+ case AV_OPT_TYPE_CONST: // fallthrough
+ default: