From: Bernd Kuhls <bernd@kuhls.net>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 4/5] package/kodi-inputstream-ffmpegdirect: Fix build with ffmpeg-7.0
Date: Tue, 13 Oct 2026 23:50:28 +0200 [thread overview]
Message-ID: <20261013215029.317512-4-bernd@kuhls.net> (raw)
In-Reply-To: <20261013215029.317512-1-bernd@kuhls.net>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0001-Update-to-7.1.patch | 106 ++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
diff --git a/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch b/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
new file mode 100644
index 0000000000..a82b9a5ee8
--- /dev/null
+++ b/package/kodi-inputstream-ffmpegdirect/0001-Update-to-7.1.patch
@@ -0,0 +1,106 @@
+From c7272c63151921bf4b63792cd2c9afc73fe5d666 Mon Sep 17 00:00:00 2001
+From: Stephan Sundermann <stephansundermann@gmail.com>
+Date: Thu, 11 Apr 2024 17:11:32 +0200
+Subject: [PATCH] Update to 7.1
+
+Upstream: https://github.com/xbmc/xbmc/commit/72fe098c8436c96763f677b4c65d32988b931b5b
+
+[Bernd: ported xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+ fix to kodi-inputstream-ffmpegdirect 21.3.8-Omega]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/stream/FFmpegStream.cpp | 71 ++-----------------------------------
+ 1 file changed, 2 insertions(+), 69 deletions(-)
+
+diff --git a/src/stream/FFmpegStream.cpp b/src/stream/FFmpegStream.cpp
+index 8bf474f..649e43e 100644
+--- a/src/stream/FFmpegStream.cpp
++++ b/src/stream/FFmpegStream.cpp
+@@ -1012,74 +1012,7 @@ bool FFmpegStream::OpenWithCURL(const AVInputFormat* iformat)
+ if (iformat == nullptr)
+ {
+ // let ffmpeg decide which demuxer we have to open
+- bool trySPDIFonly = (m_curlInput->GetContent() == "audio/x-spdif-compressed");
+-
+- if (!trySPDIFonly)
+- av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+-
+- // Use the more low-level code in case we have been built against an old
+- // FFmpeg without the above av_probe_input_buffer(), or in case we only
+- // want to probe for spdif (DTS or IEC 61937) compressed audio
+- // specifically, or in case the file is a wav which may contain DTS or
+- // IEC 61937 (e.g. ac3-in-wav) and we want to check for those formats.
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0))
+- {
+- AVProbeData pd;
+- int probeBufferSize = 32768;
+- std::unique_ptr<uint8_t[]> probe_buffer (new uint8_t[probeBufferSize + AVPROBE_PADDING_SIZE]);
+-
+- // init probe data
+- pd.buf = probe_buffer.get();
+- pd.filename = strFile.c_str();
+-
+- // read data using avformat's buffers
+- pd.buf_size = avio_read(m_ioContext, pd.buf, probeBufferSize);
+- if (pd.buf_size <= 0)
+- {
+- Log(LOGLEVEL_ERROR, "%s - error reading from input stream, %s", __FUNCTION__, CURL::GetRedacted(strFile).c_str());
+- return false;
+- }
+- memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
+-
+- // restore position again
+- avio_seek(m_ioContext , 0, SEEK_SET);
+-
+- // the advancedsetting is for allowing the user to force outputting the
+- // 44.1 kHz DTS wav file as PCM, so that an A/V receiver can decode
+- // it (this is temporary until we handle 44.1 kHz passthrough properly)
+- if (trySPDIFonly || (iformat && strcmp(iformat->name, "wav") == 0)) // && !CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_VideoPlayerIgnoreDTSinWAV))
+- {
+- // check for spdif and dts
+- // This is used with wav files and audio CDs that may contain
+- // a DTS or AC3 track padded for S/PDIF playback. If neither of those
+- // is present, we assume it is PCM audio.
+- // AC3 is always wrapped in iec61937 (ffmpeg "spdif"), while DTS
+- // may be just padded.
+- const AVInputFormat* iformat2 = av_find_input_format("spdif");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else
+- {
+- // not spdif or no spdif demuxer, try dts
+- iformat2 = av_find_input_format("dts");
+-
+- if (iformat2 && iformat2->read_probe(&pd) > AVPROBE_SCORE_MAX / 4)
+- {
+- iformat = iformat2;
+- }
+- else if (trySPDIFonly)
+- {
+- // not dts either, return false in case we were explicitly
+- // requested to only check for S/PDIF padded compressed audio
+- Log(LOGLEVEL_DEBUG, "%s - not spdif or dts file, falling back", __FUNCTION__);
+- return false;
+- }
+- }
+- }
+- }
++ av_probe_input_buffer(m_ioContext, &iformat, strFile.c_str(), NULL, 0, 0);
+
+ if (!iformat)
+ {
+@@ -1535,7 +1468,7 @@ bool FFmpegStream::SeekTime(double time, bool backwards, double* startpts)
+
+ if (ret >= 0)
+ {
+- if (m_pFormatContext->iformat->read_seek)
++ if (!(m_pFormatContext->iformat->flags & AVFMT_NOTIMESTAMPS))
+ m_seekToKeyFrame = true;
+
+ m_currentPts = STREAM_NOPTS_VALUE;
+--
+2.47.3
+
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-10-13 21:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 21:50 [Buildroot] [PATCH 1/5] package/gerbera: fix build with ffmpeg 7.0 Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 2/5] package/libcamera-apps: " Bernd Kuhls
2026-10-13 21:50 ` [Buildroot] [PATCH 3/5] package/kodi: support " Bernd Kuhls
2026-10-13 21:50 ` Bernd Kuhls [this message]
2026-10-13 21:50 ` [Buildroot] [PATCH 5/5] package/ffmpeg: bump version to 7.0.3 Bernd Kuhls
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-4-bernd@kuhls.net \
--to=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.