From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0
Date: Tue, 13 Oct 2026 23:50:25 +0200 [thread overview]
Message-ID: <20261013215029.317512-1-bernd@kuhls.net> (raw)
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...-transcode-fix-build-with-ffmpeg-7.0.patch | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
diff --git a/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch b/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
new file mode 100644
index 0000000000..903987ede1
--- /dev/null
+++ b/package/gerbera/0001-transcode-fix-build-with-ffmpeg-7.0.patch
@@ -0,0 +1,60 @@
+From 56bb6e877794c1209e1930e851b8b8642b4b26ba Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sat, 10 Oct 2026 23:37:15 +0200
+Subject: [PATCH] transcode: fix build with ffmpeg 7.0
+
+Fixes build error with ffmpeg 7.0.3:
+
+src/transcoding/transcode_int_util.cc: In member function
+ 'int StreamContext::createEncoder(AVStream*, AVFormatContext*)':
+src/transcoding/transcode_int_util.cc:608:17: error:
+ 'AV_CODEC_CONFIG_PIX_FORMAT' was not declared in this scope
+src/transcoding/transcode_int_util.cc:607:19: error:
+ 'avcodec_get_supported_config' was not declared in this scope;
+ did you mean 'avcodec_get_hw_config'?
+src/transcoding/transcode_int_util.cc:638:17: error:
+ 'AV_CODEC_CONFIG_SAMPLE_FORMAT' was not declared in this scope
+src/transcoding/transcode_int_util.cc:637:19: error:
+ 'avcodec_get_supported_config' was not declared in this scope;
+ did you mean 'avcodec_get_hw_config'?
+
+Adjust the version check according to ffmpeg docs:
+
+https://code.ffmpeg.org/FFmpeg/FFmpeg/src/tag/n9.0.2/doc/APIchanges#L446
+"2024-09-08 - 3305767560a - lavc 61.13.100 - avcodec.h
+ Add avcodec_get_supported_config() and enum AVCodecConfig; deprecate
+ AVCodec.pix_fmts, AVCodec.sample_fmts, AVCodec.supported_framerates,
+ AVCodec.supported_samplerates and AVCodec.ch_layouts."
+
+Upstream: https://github.com/gerbera/gerbera/commit/73fa1638958fae7db0579b694983164b10946b8d
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/transcoding/transcode_int_util.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/transcoding/transcode_int_util.cc b/src/transcoding/transcode_int_util.cc
+index 014942ab9..89964615c 100644
+--- a/src/transcoding/transcode_int_util.cc
++++ b/src/transcoding/transcode_int_util.cc
+@@ -619,7 +619,7 @@ int StreamContext::createEncoder(
+ enc_ctx->sample_aspect_ratio = settings.aspectRatio;
+
+ // Set first supported pixel format
+-#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0))
++#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 13, 100))
+ /* take first format from list of supported formats */
+ if (encoder->pix_fmts)
+ enc_ctx->pix_fmt = encoder->pix_fmts[0];
+@@ -652,7 +652,7 @@ int StreamContext::createEncoder(
+ #endif
+
+ // Set first supported sample format
+-#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0))
++#if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 13, 100))
+ if (encoder->sample_fmts)
+ enc_ctx->sample_fmt = encoder->sample_fmts[0];
+ #else
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-10-13 21:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 21:50 Bernd Kuhls [this message]
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: fix build with ffmpeg 7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 3/5] package/kodi: support " Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3 Bernd Kuhls
2026-10-18 20:04 ` [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013215029.317512-1-bernd@kuhls.net \
--to=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox