package/ffmpeg: bump version to 7.0.3

Removed patches 0005, 0006 & 0007 which are included in this release.

Removed configure option --disable-crystalhd due to upstream removal:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5b23b18d40ead8606c92d967279b3f43c94d8a60

Added fix for Kodi to fix a build error introduced by this bump, the
patch was split from the upstream PR because it is incompatible with
ffmpeg 6.1.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Cc: Mahyar Koshkouei <mahyar.koshkouei@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bernd Kuhls
2026-10-13 23:50:29 +02:00
committed by Thomas Petazzoni
parent c452893575
commit b68bde5643
6 changed files with 49 additions and 115 deletions

View File

@@ -1,32 +0,0 @@
From e8a49b1424d405441fb23c2850274a84e95bd892 Mon Sep 17 00:00:00 2001
From: Zhao Zhili <zhilizhao@tencent.com>
Date: Tue, 21 Nov 2023 04:05:08 +0800
Subject: [PATCH] avcodec/mmaldec: Fix build error
Fix #10670.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Upstream: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=e8a49b1424d405441fb23c2850274a84e95bd892
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
libavcodec/mmaldec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index 4bb3eb22ef..2dc7bbee04 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -843,7 +843,7 @@ static const AVClass ffmmal_dec_class = {
.flush = ffmmal_flush, \
.p.priv_class = &ffmmal_dec_class, \
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
- .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE \
+ .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE, \
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NONE}, \
--
2.30.2

View File

@@ -1,52 +0,0 @@
From 347a70f101be28f8d78e8fd62ffc3a78324f49e9 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Thu, 28 Mar 2024 05:35:36 +0100
Subject: [PATCH] avcodec/pcm-bluray/dvd: Use correct pointer types on BE
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/347a70f101be28f8d78e8fd62ffc3a78324f49e9
---
libavcodec/pcm-bluray.c | 5 +++--
libavcodec/pcm-dvd.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/pcm-bluray.c b/libavcodec/pcm-bluray.c
index f65609514a..235020d78f 100644
--- a/libavcodec/pcm-bluray.c
+++ b/libavcodec/pcm-bluray.c
@@ -167,7 +167,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
samples *= num_source_channels;
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, buf_size);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, buf_size);
#else
do {
*dst16++ = bytestream2_get_be16u(&gb);
@@ -187,7 +187,8 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) {
do {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, avctx->ch_layout.nb_channels * 2);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16,
+ avctx->ch_layout.nb_channels * 2);
dst16 += avctx->ch_layout.nb_channels;
#else
channel = avctx->ch_layout.nb_channels;
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 419b2a138f..319746c62e 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -157,7 +157,7 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
switch (avctx->bits_per_coded_sample) {
case 16: {
#if HAVE_BIGENDIAN
- bytestream2_get_buffer(&gb, dst16, blocks * s->block_size);
+ bytestream2_get_buffer(&gb, (uint8_t*)dst16, blocks * s->block_size);
dst16 += blocks * s->block_size / 2;
#else
int samples = blocks * avctx->ch_layout.nb_channels;
--
2.39.2

View File

@@ -1,28 +0,0 @@
From 6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Wed, 31 Jul 2024 10:00:54 -0300
Subject: [PATCH] avutil/hwcontext_vaapi: use the correct type for
VASurfaceAttribExternalBuffers.buffers
Should fix ticket #11115.
Signed-off-by: James Almer <jamrial@gmail.com>
Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
libavutil/hwcontext_vaapi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index 4cb25dd03212e..15fd84aa40679 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -1225,7 +1225,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
if (!use_prime2 || vas != VA_STATUS_SUCCESS) {
int k;
- unsigned long buffer_handle;
+ uintptr_t buffer_handle;
VASurfaceAttribExternalBuffers buffer_desc;
VASurfaceAttrib buffer_attrs[2] = {
{

View File

@@ -1,5 +1,5 @@
# Locally calculated
sha256 05fbe9db1f5452a3605bb1d9bf91da9d4bb08162891692e4f172b58c49109412 ffmpeg-6.1.5.tar.xz
sha256 bbb18f3cc5c1c34b21cf176c0168c4d9aa97697542a97f60d491a58a814dea65 ffmpeg-7.0.3.tar.xz
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPLv2
sha256 246041b6ecf9bc32d718a62c57877c78b5eb397b6467e74ed7ae2626ab189c30 COPYING.LGPLv2.1
sha256 cb48bf09a11f5fb576cddb0431c8f5ed0a60157a9ec942adffc13907cbe083f2 LICENSE.md

View File

@@ -4,7 +4,7 @@
#
################################################################################
FFMPEG_VERSION = 6.1.5
FFMPEG_VERSION = 7.0.3
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
FFMPEG_SITE = https://ffmpeg.org/releases
FFMPEG_INSTALL_STAGING = YES
@@ -32,7 +32,6 @@ FFMPEG_CONF_OPTS = \
--disable-gray \
--enable-swscale-alpha \
--disable-small \
--disable-crystalhd \
--disable-dxva2 \
--enable-runtime-cpudetect \
--disable-hardcoded-tables \

View File

@@ -0,0 +1,47 @@
From 8efb3fbddf1af2503b28ed21ccb23255f5031821 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.0
Upstream: https://github.com/xbmc/xbmc/pull/24972#event-12966390666
Patch was cherry-picked from upstream tree:
https://github.com/xbmc/xbmc/commits/0e935f9edb30fd905f14230af653930b5fe139e8/
[Bernd: re-add fixes for xbmc/cdrip which are incompatible with
ffmpeg 6.1]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
xbmc/cdrip/EncoderFFmpeg.cpp | 2 +-
xbmc/cdrip/EncoderFFmpeg.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbmc/cdrip/EncoderFFmpeg.cpp b/xbmc/cdrip/EncoderFFmpeg.cpp
index 85f5fa412e..907d2591dd 100644
--- a/xbmc/cdrip/EncoderFFmpeg.cpp
+++ b/xbmc/cdrip/EncoderFFmpeg.cpp
@@ -235,7 +235,7 @@ void CEncoderFFmpeg::SetTag(const std::string& tag, const std::string& value)
av_dict_set(&m_formatCtx->metadata, tag.c_str(), value.c_str(), 0);
}
-int CEncoderFFmpeg::avio_write_callback(void* opaque, uint8_t* buf, int buf_size)
+int CEncoderFFmpeg::avio_write_callback(void* opaque, const uint8_t* buf, int buf_size)
{
CEncoderFFmpeg* enc = static_cast<CEncoderFFmpeg*>(opaque);
if (enc->Write(buf, buf_size) != buf_size)
diff --git a/xbmc/cdrip/EncoderFFmpeg.h b/xbmc/cdrip/EncoderFFmpeg.h
index 48471a4b10..4e9f0f5bbb 100644
--- a/xbmc/cdrip/EncoderFFmpeg.h
+++ b/xbmc/cdrip/EncoderFFmpeg.h
@@ -33,7 +33,7 @@ public:
bool Close() override;
private:
- static int avio_write_callback(void* opaque, uint8_t* buf, int buf_size);
+ static int avio_write_callback(void* opaque, const uint8_t* buf, int buf_size);
static int64_t avio_seek_callback(void* opaque, int64_t offset, int whence);
void SetTag(const std::string& tag, const std::string& value);
--
2.47.3