]> git.pld-linux.org Git - packages/simplescreenrecorder.git/commitdiff
- add upstream fix for ffmpeg 6, rel 2 master auto/th/simplescreenrecorder-0.4.4-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 21 Oct 2023 20:57:45 +0000 (22:57 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 21 Oct 2023 20:57:45 +0000 (22:57 +0200)
ffmpeg6.patch [new file with mode: 0644]
simplescreenrecorder.spec

diff --git a/ffmpeg6.patch b/ffmpeg6.patch
new file mode 100644 (file)
index 0000000..654232a
--- /dev/null
@@ -0,0 +1,63 @@
+From 768957a8de1534f0aa91bfc5d7af3c32f222beb8 Mon Sep 17 00:00:00 2001
+From: Maarten Baert <maarten-baert@hotmail.com>
+Date: Sun, 20 Mar 2022 22:52:43 +0100
+Subject: [PATCH] Fix for compatibility with newer FFmpeg versions
+
+---
+ src/AV/Output/AudioEncoder.cpp | 3 ++-
+ src/AV/Output/Muxer.cpp        | 6 ++++--
+ src/AV/Output/VideoEncoder.cpp | 3 ++-
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/src/AV/Output/AudioEncoder.cpp b/src/AV/Output/AudioEncoder.cpp
+index 34d015cf..3efde703 100644
+--- a/src/AV/Output/AudioEncoder.cpp
++++ b/src/AV/Output/AudioEncoder.cpp
+@@ -77,7 +77,8 @@ unsigned int AudioEncoder::GetSampleRate() {
+ }
+ bool AudioEncoder::AVCodecIsSupported(const QString& codec_name) {
+-      AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++      // we have to break const correctness for compatibility with older ffmpeg versions
++      AVCodec *codec = (AVCodec*) avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+       if(codec == NULL)
+               return false;
+       if(!av_codec_is_encoder(codec))
+diff --git a/src/AV/Output/Muxer.cpp b/src/AV/Output/Muxer.cpp
+index ad583803..bc6dd71c 100644
+--- a/src/AV/Output/Muxer.cpp
++++ b/src/AV/Output/Muxer.cpp
+@@ -194,7 +194,8 @@ unsigned int Muxer::GetQueuedPacketCount(unsigned int stream_index) {
+ void Muxer::Init() {
+       // get the format we want (this is just a pointer, we don't have to free this)
+-      AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL);
++      // we have to break const correctness for compatibility with older ffmpeg versions
++      AVOutputFormat *format = (AVOutputFormat*) av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL);
+       if(format == NULL) {
+               Logger::LogError("[Muxer::Init] " + Logger::tr("Error: Can't find chosen output format!"));
+               throw LibavException();
+@@ -262,7 +263,8 @@ void Muxer::Free() {
+ }
+ AVCodec* Muxer::FindCodec(const QString& codec_name) {
+-      AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++      // we have to break const correctness for compatibility with older ffmpeg versions
++      AVCodec *codec = (AVCodec*) avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+       if(codec == NULL) {
+               Logger::LogError("[Muxer::FindCodec] " + Logger::tr("Error: Can't find codec!"));
+               throw LibavException();
+diff --git a/src/AV/Output/VideoEncoder.cpp b/src/AV/Output/VideoEncoder.cpp
+index 8087e8ed..d09d7047 100644
+--- a/src/AV/Output/VideoEncoder.cpp
++++ b/src/AV/Output/VideoEncoder.cpp
+@@ -95,7 +95,8 @@ unsigned int VideoEncoder::GetFrameRate() {
+ }
+ bool VideoEncoder::AVCodecIsSupported(const QString& codec_name) {
+-      AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
++      // we have to break const correctness for compatibility with older ffmpeg versions
++      AVCodec *codec = (AVCodec*) avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
+       if(codec == NULL)
+               return false;
+       if(!av_codec_is_encoder(codec))
index e22b2cb7f3ca6443f04e98317d0f81ed8b775bf6..c3bfbc0c424c7558f65f9defe6a6be00d40f5c7c 100644 (file)
@@ -7,11 +7,12 @@ Summary:      Screen recorder for Linux
 Summary(pl.UTF-8):     Nagrywarka ekranu dla Linuksa
 Name:          simplescreenrecorder
 Version:       0.4.4
-Release:       1
+Release:       2
 License:       GPL v3
 Group:         Applications
 Source0:       https://github.com/MaartenBaert/ssr/archive/%{version}/ssr-%{version}.tar.gz
 # Source0-md5: 6360ff633bcb88b0c221d56fd52b7dac
+Patch0:                ffmpeg6.patch
 URL:           http://www.maartenbaert.be/simplescreenrecorder/
 BuildRequires: Mesa-libGL-devel
 BuildRequires: Mesa-libGLU-devel
@@ -57,6 +58,7 @@ OpenGL applications, for use with the SimpleScreenRecorder.
 
 %prep
 %setup -q -n ssr-%{version}
+%patch0 -p1
 
 %build
 %cmake \
This page took 0.16495 seconds and 4 git commands to generate.