commit 26e4a08be2d23c7f96dcb2a3b2725fd0134f4405
Author: Vasiliy Glazov <v.glazov(a)1440.space>
Date: Tue Nov 5 10:38:31 2024 +0300
Update to 5.7.1.
28611.patch | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
telegram-desktop.spec | 9 ++++--
3 files changed, 91 insertions(+), 3 deletions(-)
---
diff --git a/28611.patch b/28611.patch
new file mode 100644
index 0000000..8df72f3
--- /dev/null
+++ b/28611.patch
@@ -0,0 +1,83 @@
+From c8d2958d54759d38cbe06e9136baf93b0c92405e Mon Sep 17 00:00:00 2001
+From: xiota <github(a)mentalfossa.com>
+Date: Mon, 4 Nov 2024 20:40:37 +0000
+Subject: [PATCH 1/2] Fix some ffmpeg 7.x related errors
+
+---
+ Telegram/SourceFiles/ui/controls/round_video_recorder.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
b/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
+index f01df2165be3fd..4ba0e7768bd129 100644
+--- a/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
++++ b/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
+@@ -107,9 +107,15 @@ class RoundVideoRecorder::Private final {
+ std::array<int64, kMaxStreams> lastDts = { 0 };
+ };
+
++#if DA_FFMPEG_CONST_WRITE_CALLBACK
++ static int Write(void *opaque, const uint8_t *_buf, int buf_size) {
++ uint8_t *buf = const_cast<uint8_t *>(_buf);
++#else
+ static int Write(void *opaque, uint8_t *buf, int buf_size) {
++#endif
+ return static_cast<Private*>(opaque)->write(buf, buf_size);
+ }
++
+ static int64_t Seek(void *opaque, int64_t offset, int whence) {
+ return static_cast<Private*>(opaque)->seek(offset, whence);
+ }
+@@ -388,7 +394,6 @@ bool RoundVideoRecorder::Private::initAudio() {
+ _audioCodec->sample_rate = kAudioFrequency;
+ #if DA_FFMPEG_NEW_CHANNEL_LAYOUT
+ _audioCodec->ch_layout = AV_CHANNEL_LAYOUT_MONO;
+- _audioCodec->channels = _audioCodec->ch_layout.nb_channels;
+ #else
+ _audioCodec->channel_layout = AV_CH_LAYOUT_MONO;
+ _audioCodec->channels = _audioChannels;
+
+From a2be973d9cdf955f3b01610c7247da0f157dc2a4 Mon Sep 17 00:00:00 2001
+From: xiota <github(a)mentalfossa.com>
+Date: Mon, 4 Nov 2024 22:49:00 +0000
+Subject: [PATCH 2/2] Use alternate fix for ffmpeg const issue
+
+---
+ .../SourceFiles/ui/controls/round_video_recorder.cpp | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
b/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
+index 4ba0e7768bd129..d073802e0f386a 100644
+--- a/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
++++ b/Telegram/SourceFiles/ui/controls/round_video_recorder.cpp
+@@ -107,12 +107,7 @@ class RoundVideoRecorder::Private final {
+ std::array<int64, kMaxStreams> lastDts = { 0 };
+ };
+
+-#if DA_FFMPEG_CONST_WRITE_CALLBACK
+- static int Write(void *opaque, const uint8_t *_buf, int buf_size) {
+- uint8_t *buf = const_cast<uint8_t *>(_buf);
+-#else
+- static int Write(void *opaque, uint8_t *buf, int buf_size) {
+-#endif
++ static int Write(void *opaque, const uint8_t *buf, int buf_size) {
+ return static_cast<Private*>(opaque)->write(buf, buf_size);
+ }
+
+@@ -120,7 +115,7 @@ class RoundVideoRecorder::Private final {
+ return static_cast<Private*>(opaque)->seek(offset, whence);
+ }
+
+- int write(uint8_t *buf, int buf_size);
++ int write(const uint8_t *buf, int buf_size);
+ int64_t seek(int64_t offset, int whence);
+
+ void initEncoding();
+@@ -236,7 +231,7 @@ RoundVideoRecorder::Private::~Private() {
+ finishEncoding();
+ }
+
+-int RoundVideoRecorder::Private::write(uint8_t *buf, int buf_size) {
++int RoundVideoRecorder::Private::write(const uint8_t *buf, int buf_size) {
+ if (const auto total = _resultOffset + int64(buf_size)) {
+ const auto size = int64(_result.size());
+ constexpr auto kReserve = 1024 * 1024;
diff --git a/sources b/sources
index 50d9a15..e810309 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (tdesktop-5.6.3-full.tar.gz) =
0cce16f780f1350199d8a10a9eff6e8052888aede5d3839d3435acdfb34f445098ec24cac21d1950f704350c22bec86020e6c746706bb34c5533e2086e6cb597
+SHA512 (tdesktop-5.7.1-full.tar.gz) =
06c465c6766ba2bb349bb37dd629fa494275cd9c165357ae39bfa7d967f0cce40c587788e88551705923d7bab089fc6a11d3175902c930dca7506a3bfb7d09b5
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index ed7d120..ea66b18 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -5,8 +5,8 @@
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
Name: telegram-desktop
-Version: 5.6.3
-Release: 2%{?dist}
+Version: 5.7.1
+Release: 1%{?dist}
# Application and 3rd-party modules licensing:
# * Telegram Desktop - GPL-3.0-or-later with OpenSSL exception -- main tarball;
@@ -20,6 +20,7 @@ License: GPL-3.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND
Apache-2.0 AND M
URL:
https://github.com/telegramdesktop/%{appname}
Summary: Telegram Desktop official messaging app
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}-full.tar.gz
+Patch0: 28611.patch
# Telegram Desktop require more than 8 GB of RAM on linking stage.
# Disabling all low-memory architectures.
@@ -177,6 +178,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_metainfodir}/*.metainfo.xml
%changelog
+* Tue Nov 05 2024 Vasiliy Glazov <vascom2(a)gmail.com> - 5.7.1-1
+- Update to 5.7.1
+- Add patch for ffmpeg
+
* Mon Nov 04 2024 Vasiliy Glazov <vascom2(a)gmail.com> - 5.6.3-2
- Rebuild for new Qt