From 042bf062d852eae37953f639cb2d6b801029bc40 Mon Sep 17 00:00:00 2001 From: Michael Nottebrock Date: Sun, 23 Jul 2006 20:24:36 +0000 Subject: [PATCH] Fix KDE Bug 119504 (arts memory leak when playing ogg and mp3 files). PR: ports/100700 Submitted by: Axel Gonzalez --- multimedia/kdemultimedia3/Makefile | 1 + ...-akode_artsplugin_akodePlayObject_impl.cpp | 33 +++++++++++++++++++ multimedia/kdemultimedia4/Makefile | 1 + ...-akode_artsplugin_akodePlayObject_impl.cpp | 33 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 multimedia/kdemultimedia3/files/patch-akode_artsplugin_akodePlayObject_impl.cpp create mode 100644 multimedia/kdemultimedia4/files/patch-akode_artsplugin_akodePlayObject_impl.cpp diff --git a/multimedia/kdemultimedia3/Makefile b/multimedia/kdemultimedia3/Makefile index edcf681d6742..859e159c612b 100644 --- a/multimedia/kdemultimedia3/Makefile +++ b/multimedia/kdemultimedia3/Makefile @@ -8,6 +8,7 @@ PORTNAME= kdemultimedia PORTVERSION= ${KDE_VERSION} +PORTREVISION= 1 CATEGORIES= multimedia kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src diff --git a/multimedia/kdemultimedia3/files/patch-akode_artsplugin_akodePlayObject_impl.cpp b/multimedia/kdemultimedia3/files/patch-akode_artsplugin_akodePlayObject_impl.cpp new file mode 100644 index 000000000000..cf6e40c60d1c --- /dev/null +++ b/multimedia/kdemultimedia3/files/patch-akode_artsplugin_akodePlayObject_impl.cpp @@ -0,0 +1,33 @@ +--- akode_artsplugin/akodePlayObject_impl.cpp.orig Fri Jul 21 22:10:02 2006 ++++ akode_artsplugin/akodePlayObject_impl.cpp Fri Jul 21 22:13:13 2006 +@@ -82,6 +82,8 @@ + + akodePlayObject_impl::~akodePlayObject_impl() + { ++ delete m_packetQueue; ++ + unload(); + } + +@@ -219,10 +221,9 @@ + delete bufferedDecoder; + bufferedDecoder = 0; + } +-#else +- delete frameDecoder +- frameDecoder = 0; + #endif ++ delete frameDecoder; ++ frameDecoder = 0; + decoder = 0; + if (buffer != inBuffer) + delete inBuffer; +@@ -301,7 +302,7 @@ + { + arts_debug("akode: readFrame"); + +- if (!buffer || !decoder) return false; ++ if (!inBuffer || !decoder) return false; + if (m_bytebuffer) processQueue(); + if(!decoder->readFrame(inBuffer)) { + if (decoder->eof()) { \ No newline at end of file diff --git a/multimedia/kdemultimedia4/Makefile b/multimedia/kdemultimedia4/Makefile index edcf681d6742..859e159c612b 100644 --- a/multimedia/kdemultimedia4/Makefile +++ b/multimedia/kdemultimedia4/Makefile @@ -8,6 +8,7 @@ PORTNAME= kdemultimedia PORTVERSION= ${KDE_VERSION} +PORTREVISION= 1 CATEGORIES= multimedia kde MASTER_SITES= ${MASTER_SITE_KDE} MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src diff --git a/multimedia/kdemultimedia4/files/patch-akode_artsplugin_akodePlayObject_impl.cpp b/multimedia/kdemultimedia4/files/patch-akode_artsplugin_akodePlayObject_impl.cpp new file mode 100644 index 000000000000..cf6e40c60d1c --- /dev/null +++ b/multimedia/kdemultimedia4/files/patch-akode_artsplugin_akodePlayObject_impl.cpp @@ -0,0 +1,33 @@ +--- akode_artsplugin/akodePlayObject_impl.cpp.orig Fri Jul 21 22:10:02 2006 ++++ akode_artsplugin/akodePlayObject_impl.cpp Fri Jul 21 22:13:13 2006 +@@ -82,6 +82,8 @@ + + akodePlayObject_impl::~akodePlayObject_impl() + { ++ delete m_packetQueue; ++ + unload(); + } + +@@ -219,10 +221,9 @@ + delete bufferedDecoder; + bufferedDecoder = 0; + } +-#else +- delete frameDecoder +- frameDecoder = 0; + #endif ++ delete frameDecoder; ++ frameDecoder = 0; + decoder = 0; + if (buffer != inBuffer) + delete inBuffer; +@@ -301,7 +302,7 @@ + { + arts_debug("akode: readFrame"); + +- if (!buffer || !decoder) return false; ++ if (!inBuffer || !decoder) return false; + if (m_bytebuffer) processQueue(); + if(!decoder->readFrame(inBuffer)) { + if (decoder->eof()) { \ No newline at end of file