From d32d64831cae2cbec17f510b76541e93cb2d600ddd7d6847f8f84bf78bf69c09 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 29 Feb 2012 13:08:01 +0000 Subject: [PATCH] Accepting request 107423 from KDE:Distro:Factory fix crash on resume (forwarded request 107421 from jirislaby) OBS-URL: https://build.opensuse.org/request/show/107423 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kaffeine?expand=0&rev=46 --- crash-on-resume-fix.patch | 31 +++++++++++++++++++++++++++++++ kaffeine.changes | 5 +++++ kaffeine.spec | 13 +++++++------ 3 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 crash-on-resume-fix.patch diff --git a/crash-on-resume-fix.patch b/crash-on-resume-fix.patch new file mode 100644 index 0000000..a90caaf --- /dev/null +++ b/crash-on-resume-fix.patch @@ -0,0 +1,31 @@ +--- + src/dvb/dvbmanager.cpp | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +--- a/src/dvb/dvbmanager.cpp ++++ b/src/dvb/dvbmanager.cpp +@@ -448,15 +448,17 @@ void DvbManager::deviceAdded(DvbBackendD + void DvbManager::deviceRemoved(DvbBackendDevice *backendDevice) + { + for (int i = 0; i < deviceConfigs.size(); ++i) { +- if (deviceConfigs.at(i).device->getBackendDevice() == backendDevice) { +- if (deviceConfigs[i].useCount != 0) { +- deviceConfigs[i].useCount = 0; +- deviceConfigs[i].prioritizedUseCount = 0; +- deviceConfigs[i].device->release(); ++ DvbDeviceConfig &it = deviceConfigs[i]; ++ ++ if (it.device && it.device->getBackendDevice() == backendDevice) { ++ if (it.useCount != 0) { ++ it.useCount = 0; ++ it.prioritizedUseCount = 0; ++ it.device->release(); + } + +- delete deviceConfigs[i].device; +- deviceConfigs[i].device = NULL; ++ delete it.device; ++ it.device = NULL; + break; + } + } diff --git a/kaffeine.changes b/kaffeine.changes index de77e07..905e1ec 100644 --- a/kaffeine.changes +++ b/kaffeine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 28 11:27:56 CET 2012 - jslaby@suse.de + +- fix crash on resume + ------------------------------------------------------------------- Thu Oct 27 00:10:17 UTC 2011 - fisiu@opensuse.org diff --git a/kaffeine.spec b/kaffeine.spec index cedc767..e07c7b2 100644 --- a/kaffeine.spec +++ b/kaffeine.spec @@ -1,7 +1,7 @@ # # spec file for package kaffeine # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,17 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: kaffeine Version: 1.2.2 -Release: 1 +Release: 0 Summary: Xine-Based Multimedia Player - License: GPL-2.0+ -Url: http://kaffeine.kde.org/ Group: Productivity/Multimedia/Video/Players + +Url: http://kaffeine.kde.org/ # http://sourceforge.net/projects/kaffeine/files/current/kaffeine-1.2.2.tar.gz Source0: %{name}-%{version}.tar.bz2 Source1: %{name}-icons.tar.bz2 @@ -39,6 +37,8 @@ Patch3: initial-preference.diff Patch4: build-fix.diff # PATCH-FIX-OPENSUSE support_mimetypes_bnc671581.diff bnc#671581 ctrippe@gmx.net -- Support audio/webm and video/x-theora+ogg Patch5: support_mimetypes_bnc671581.diff +# PATCH-FIX-UPSTREAM +Patch6: crash-on-resume-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libkde4-devel @@ -70,6 +70,7 @@ and Ogg Vorbis. It also handles Video CDs, DVDs, and DVB cards. %if 0%{?suse_version} > 1130 %patch5 %endif +%patch6 -p1 %build %cmake_kde4 -d build