commit 45fdbd7e76a4b90423959f777851a244ae11e3e2
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Thu Mar 23 00:40:03 2017 +0000
Patch for gcc7
k3b-2.0.3-gcc7.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++
k3b-extras-freeworld.spec | 10 +++++----
2 files changed, 63 insertions(+), 4 deletions(-)
---
diff --git a/k3b-2.0.3-gcc7.patch b/k3b-2.0.3-gcc7.patch
new file mode 100644
index 0000000..db4c9d0
--- /dev/null
+++ b/k3b-2.0.3-gcc7.patch
@@ -0,0 +1,57 @@
+From 1777236203f21eed7a9baade632472094c8081d3 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino(a)kde.org>
+Date: Sat, 4 Feb 2017 10:48:45 +0100
+Subject: [PATCH] ffmpeg: fix/simplify metadata conversion to string
+
+Comparing a pointer with an integer value is (correctly) an error with
+GCC 7.
+---
+ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp | 21 +++------------------
+ 1 file changed, 3 insertions(+), 18 deletions(-)
+
+diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+index a4fc784..22928b2 100644
+--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
++++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+@@ -259,12 +259,7 @@ QString K3bFFMpegFile::title() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata,
"TITLE", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit(
ade->value ) : QString();
+ }
+
+
+@@ -272,12 +267,7 @@ QString K3bFFMpegFile::author() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata,
"ARTIST", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit(
ade->value ) : QString();
+ }
+
+
+@@ -285,12 +275,7 @@ QString K3bFFMpegFile::comment() const
+ {
+ // FIXME: is this UTF8 or something??
+ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata,
"COMMENT", NULL, 0 );
+- if( ade == NULL )
+- return QString();
+- if( ade->value != '\0' )
+- return QString::fromLocal8Bit( ade->value );
+- else
+- return QString();
++ return ade && ade->value[0] != '\0' ? QString::fromLocal8Bit(
ade->value ) : QString();
+ }
+
+
diff --git a/k3b-extras-freeworld.spec b/k3b-extras-freeworld.spec
index 5c8dafd..7b96eb8 100644
--- a/k3b-extras-freeworld.spec
+++ b/k3b-extras-freeworld.spec
@@ -8,7 +8,7 @@ Name: k3b-extras-freeworld
Summary: Additional codec plugins for the k3b CD/DVD burning application
Epoch: 1
Version: 2.0.3
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+
URL:
http://www.k3b.org/
@@ -21,6 +21,7 @@ ExcludeArch: s390 s390x
# see also
http://bugs.kde.org/325486
Patch500: k3b-ffmpeg3.patch
Patch501: k3b-2.0.3-gcc6.patch
+Patch502: k3b-2.0.3-gcc7.patch
BuildRequires: desktop-file-utils
BuildRequires: gettext
@@ -59,9 +60,7 @@ handle CD/DVD burning application.
%prep
-%setup -q -n k3b-%{version}
-%patch500 -p1
-%patch501 -p1
+%autosetup -p1 -n k3b-%{version}
# hack around cmake-related FTBFS
sed -i.cmakehack -e "s|^cmake_minimum_required|#cmake_minimum_required|"
CMakeLists.txt
@@ -106,6 +105,9 @@ popd
%changelog
+* Thu Mar 23 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1:2.0.3-5
+- Patch for gcc7
+
* Sun Mar 19 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> -
1:2.0.3-4
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild