Hello community, here is the log from the commit of package amarok checked in at Wed Apr 5 17:11:15 CEST 2006. -------- --- KDE/amarok/amarok.changes 2006-04-04 15:30:37.000000000 +0200 +++ amarok/amarok.changes 2006-04-05 16:52:28.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Apr 5 16:50:41 CEST 2006 - dmueller@suse.de + +- fix memory leak in helix engine (#163481) + +------------------------------------------------------------------- New: ---- helix-memleak-fix.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ amarok.spec ++++++ --- /var/tmp/diff_new_pack.dQ7Nvv/_old 2006-04-05 17:09:12.000000000 +0200 +++ /var/tmp/diff_new_pack.dQ7Nvv/_new 2006-04-05 17:09:12.000000000 +0200 @@ -19,7 +19,7 @@ Group: Productivity/Multimedia/Sound/Players Summary: Media Player for KDE Version: 1.3.8 -Release: 20 +Release: 21 BuildRoot: %{_tmppath}/%{name}-%{version}-build %define rversion 1.3.8 %define mversion 0.5 @@ -41,6 +41,7 @@ Patch12: collectiondb-mutex.diff Patch13: xine-memleak.patch Patch14: konqsidebar-translation.diff +Patch15: helix-memleak-fix.patch %description amaroK is a media player for all kinds of media supported by aRts or @@ -209,6 +210,7 @@ %patch12 %patch13 %patch14 +%patch15 cp %{S:10} amarok/src/engine/helix/ . /etc/opt/kde3/common_options update_admin --no-unsermake @@ -339,6 +341,8 @@ /opt/kde3/bin/amarok_libvisual %changelog -n amarok +* Wed Apr 05 2006 - dmueller@suse.de +- fix memory leak in helix engine (#163481) * Tue Apr 04 2006 - stbinner@suse.de - fix translation of Konqueror sidebar on first start (#162765) * Fri Mar 17 2006 - dmueller@suse.de ++++++ helix-memleak-fix.patch ++++++ --- amarok/src/engine/helix/helix-engine.cpp +++ amarok/src/engine/helix/helix-engine.cpp @@ -704,6 +704,8 @@ m_lasttime += HELIX_ENGINE_TIMER; + prune(); + #ifdef DEBUG_PURPOSES_ONLY // calculate the frame rate of the scope m_ftime += HELIX_ENGINE_TIMER; @@ -753,27 +755,8 @@ #endif } - -const Engine::Scope &HelixEngine::scope() +unsigned long HelixEngine::prune() { -#if 1 - - int i, sb = 0; - unsigned long t; - -#ifdef DEBUG_PURPOSES_ONLY - m_fcount++; -#endif - - if (!m_inited) - return m_scope; - - if (!m_item && !peekScopeTime(t)) - { - m_item = getScopeBuf(); - if (m_item) - sb++; - } // // this bit is to help us keep more accurate time than helix provides ///////////////////////////////////////////////////////////////////// @@ -804,7 +787,7 @@ if ( getScopeCount() > SCOPE_MAX_BEHIND ) // protect against naughty streams { resetScope(); - return m_scope; + return w; } if (!w || !m_item) @@ -812,7 +795,7 @@ #ifdef DEBUG_PURPOSES_ONLY m_scopebufnone++; // for tuning the scope... (scope is tuned for 44.1kHz sample rate) #endif - return m_scope; + return w; } while (m_item && w > m_item->etime) @@ -821,13 +804,41 @@ delete m_item; m_item = getScopeBuf(); - sb++; + m_sb++; + } + + return w; +} + +const Engine::Scope &HelixEngine::scope() +{ + int i; + unsigned long t; + + m_sb = 0; + +#ifdef DEBUG_PURPOSES_ONLY + m_fcount++; +#endif + + if (!m_inited) + return m_scope; + + if (!m_item && !peekScopeTime(t)) + { + m_item = getScopeBuf(); + if (m_item) + m_sb++; } + unsigned long w = prune(); + if (!w) + return m_scope; + #ifdef DEBUG_PURPOSES_ONLY - m_scopebuftotal += sb; - if (sb > 1) - m_scopebufwaste += (sb-1); + m_scopebuftotal += m_sb; + if (m_sb > 1) + m_scopebufwaste += (m_sb-1); #endif if (!m_item) --- amarok/src/engine/helix/helix-engine.h +++ amarok/src/engine/helix/helix-engine.h @@ -175,6 +175,7 @@ int m_scopebufnone; int m_scopebuftotal; #endif + int m_sb; unsigned long m_lasttime; unsigned long m_lastpos; unsigned short m_currentScope[512]; @@ -192,6 +193,8 @@ void timerEvent( QTimerEvent * ); void resetScope(); + unsigned long prune(); + int print2stdout(const char *fmt, ...); int print2stderr(const char *fmt, ...); --- amarok/src/engine/helix/helix-engine.cpp 2006/04/05 10:30:50 1.29 +++ amarok/src/engine/helix/helix-engine.cpp 2006/04/05 13:15:50 @@ -812,6 +812,7 @@ const Engine::Scope &HelixEngine::scope() { +#ifndef USE_HELIX_WRAPPER int i; unsigned long t; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de