Mercurial > audlegacy-plugins
changeset 2438:038e90348306
Remove static values, making the plugin re-entrant. As such, remove the now unnecessary playback mutex.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Fri, 07 Mar 2008 15:02:44 -0600 |
parents | 6b07b92a0308 |
children | be645fc2980d |
files | src/wma/wma.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wma/wma.c Fri Mar 07 14:59:24 2008 -0600 +++ b/src/wma/wma.c Fri Mar 07 15:02:44 2008 -0600 @@ -52,10 +52,7 @@ static int wma_decode = 0; static gboolean wma_pause = 0; static int wma_seekpos = -1; -static int wma_st_buff, wma_idx, wma_idx2; static GThread *wma_decode_thread; -GStaticMutex wma_mutex = G_STATIC_MUTEX_INIT; -static uint8_t *wma_outbuf, *wma_s_outbuf; char description[64]; static void wma_about(void); @@ -298,6 +295,8 @@ uint8_t *inbuf_ptr; int out_size, size, len; AVPacket pkt; + guint8 *wma_outbuf, *wma_s_outbuf; + int wma_st_buff, wma_idx, wma_idx2; if(av_open_input_file(&ic, playback->filename, NULL, 0, NULL) < 0) return; @@ -333,7 +332,6 @@ wma_decode_thread = g_thread_self(); playback->set_pb_ready(playback); - g_static_mutex_lock(&wma_mutex); while(playback->playing) { if(wma_seekpos != -1) @@ -387,7 +385,6 @@ if(pkt.data) av_free_packet(&pkt); if(c) avcodec_close(c); if(ic) av_close_input_file(ic); - g_static_mutex_unlock(&wma_mutex); } static void wma_stop(InputPlayback *playback)