From 7748146936014bb364c51e2547982e9f59a5f31a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 3 Oct 2022 01:13:47 +0100 Subject: gentoo auto-resync : 03:10:2022 - 01:13:47 --- .../files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 media-sound/deadbeef/files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch (limited to 'media-sound/deadbeef/files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch') diff --git a/media-sound/deadbeef/files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch b/media-sound/deadbeef/files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch new file mode 100644 index 000000000000..14f6b8e70556 --- /dev/null +++ b/media-sound/deadbeef/files/deadbeef-1.9.1-ffmpeg-5.0-fixes.patch @@ -0,0 +1,37 @@ +From 7b52bac5a69abeab6d8b6601fd9e36803842d9c1 Mon Sep 17 00:00:00 2001 +From: xuzhen +Date: Sun, 2 Oct 2022 12:23:02 +0800 +Subject: [PATCH] Fix build with ffmpeg 5.0+ + +av_iformat_next was replaced with av_demuxer_iterate. https://trac.ffmpeg.org/wiki/Bump59 +--- + plugins/ffmpeg/ffmpeg.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c +index 5409cc482..bfc9b6f6f 100644 +--- a/plugins/ffmpeg/ffmpeg.c ++++ b/plugins/ffmpeg/ffmpeg.c +@@ -802,7 +802,12 @@ ffmpeg_init_exts (void) { + * encoding purpose, because ffmpeg will guess the output format from + * the file name specified by users. + */ ++#if LIBAVFORMAT_VERSION_MAJOR >= 59 ++ void *iter = NULL; ++ while ((ifmt = av_demuxer_iterate(&iter))) { ++#else + while ((ifmt = av_iformat_next(ifmt))) { ++#endif + #ifdef AV_IS_INPUT_DEVICE + if (ifmt->priv_class && AV_IS_INPUT_DEVICE(ifmt->priv_class->category)) + continue; // Skip all input devices +@@ -849,7 +854,9 @@ ffmpeg_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { + static int + ffmpeg_start (void) { + ffmpeg_init_exts (); ++#if LIBAVFORMAT_VERSION_MAJOR < 58 + av_register_all (); ++#endif + return 0; + } + -- cgit v1.2.3