diff -Nur audacious-plugins-fedora-1.5.1-orig/src/musepack/libmpc.cxx audacious-plugins-1.5.1-musepack/src/musepack/libmpc.cxx
--- audacious-plugins-fedora-1.5.1-orig/src/musepack/libmpc.cxx 2008-06-08 10:37:44.000000000 +0200
+++ audacious-plugins-1.5.1-musepack/src/musepack/libmpc.cxx 2009-11-13 17:28:25.000000000 +0100
@@ -52,7 +52,6 @@
static MpcDecoder mpcDecoder = {0};
static TrackInfo track = {0};
-static GThread *threadHandle;
GStaticMutex threadMutex = G_STATIC_MUTEX_INIT;
/*
@@ -305,7 +304,6 @@
mpcDecoder.isAlive = true;
mpcDecoder.isOutput = false;
mpcDecoder.isPause = false;
- threadHandle = g_thread_self();
data->set_pb_ready(data);
decodeStream(data);
}
@@ -313,16 +311,12 @@
static void mpcStop(InputPlayback *data)
{
setAlive(false);
- if (threadHandle)
- {
- g_thread_join(threadHandle);
if (mpcDecoder.isOutput)
{
data->output->buffer_free();
data->output->close_audio();
mpcDecoder.isOutput = false;
}
- }
}
static void mpcPause(InputPlayback *data, short p_Pause)
@@ -837,8 +831,7 @@
lockAcquire();
short iPlaying = MpcPlugin.output->buffer_playing()? 1 : 0;
- gint iFree = MpcPlugin.output->buffer_free();
- if (!mpcDecoder.isPause && iFree >= ((1152 * 4) << iPlaying))
+ if (!mpcDecoder.isPause)
{
unsigned status = processBuffer(data, sampleBuffer, xmmsBuffer, decoder);
if (status == (unsigned) (-1))
@@ -864,7 +857,6 @@
else
{
lockRelease();
- g_usleep(10000);
}
}
return endThread(filename, input, false);
@@ -915,12 +907,12 @@
inline static void lockAcquire()
{
- g_static_mutex_lock(&threadMutex);
+ /* g_static_mutex_lock(&threadMutex); */
}
inline static void lockRelease()
{
- g_static_mutex_unlock(&threadMutex);
+ /* g_static_mutex_unlock(&threadMutex); */
}
inline static bool isAlive()