commit 4956e96acefdb239e746f92ca5b11e76be701140
Author: Michael Cronenworth <mike(a)cchtml.com>
Date: Sun Feb 20 17:47:26 2022 -0600
Patch for AC3 transcoding (RHBZ#6000)
kodi-19-ffmpeg-4-4-ac3.patch | 21 +++++++++++++++++++++
kodi.spec | 9 ++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/kodi-19-ffmpeg-4-4-ac3.patch b/kodi-19-ffmpeg-4-4-ac3.patch
new file mode 100644
index 0000000..d1ceb7e
--- /dev/null
+++ b/kodi-19-ffmpeg-4-4-ac3.patch
@@ -0,0 +1,21 @@
+From a80cbc027580489cb3fbaca6fa5be9261d61131a Mon Sep 17 00:00:00 2001
+From: David Heim <david(a)thymoze.com>
+Date: Tue, 14 Dec 2021 18:28:49 +0100
+Subject: [PATCH] ffmpeg: set channel count on avframe
+
+---
+ xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
+index 143ced5595a2d..f54d27abafbdc 100644
+--- a/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
++++ b/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp
+@@ -259,6 +259,7 @@ int CAEEncoderFFmpeg::Encode(uint8_t *in, int in_size, uint8_t *out,
int out_siz
+ frame->nb_samples = m_CodecCtx->frame_size;
+ frame->format = m_CodecCtx->sample_fmt;
+ frame->channel_layout = m_CodecCtx->channel_layout;
++ frame->channels = m_CodecCtx->channels;
+
+ avcodec_fill_audio_frame(frame, m_CodecCtx->channels, m_CodecCtx->sample_fmt,
+ in, in_size, 0);
diff --git a/kodi.spec b/kodi.spec
index 6fbf829..f5bd451 100644
--- a/kodi.spec
+++ b/kodi.spec
@@ -45,7 +45,7 @@
Name: kodi
Version: 19.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Media center
License: GPLv2+ and GPLv3+ and LGPLv2+ and BSD and MIT
@@ -91,6 +91,9 @@ Patch4: kodi-18-brp-mangle-shebangs.patch
# FFmpeg 4.4 support (RFBZ#6000)
Patch5: kodi-19-ffmpeg-4-4.patch
+# FFmpeg 4.4 fix for AC3 transcoding (RFBZ#6000)
+Patch6: kodi-19-ffmpeg-4-4-ac3.patch
+
%ifarch x86_64 i686
%global _with_crystalhd 1
%endif
@@ -335,6 +338,7 @@ This package contains FirewallD files for Kodi.
%patch3 -p1 -b.innobinfix
%patch4 -p1 -b.brp-mangle-shebangs
%patch5 -p1 -b.ffmpeg-4-4
+%patch6 -p1 -b.ffmpeg-4-4-ac3
# Fix up Python shebangs
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \
@@ -465,6 +469,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/kodi-wiiremote.1
%changelog
+* Sun Feb 20 2022 Michael Cronenworth <mike(a)cchtml.com> - 19.3-3
+- Patch for AC3 transcoding (RHBZ#6000)
+
* Sat Feb 19 2022 Leigh Scott <leigh123linux(a)gmail.com> - 19.3-2
- Switch to compat-ffmpeg4
- Disable package note