Mercurial > audlegacy-plugins
changeset 1391:58f74efbe943
Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Fri, 27 Jul 2007 16:20:15 -0500 |
parents | 095595555e7b (diff) e2754a023ae0 (current diff) |
children | d872ca28881f |
files | src/cdaudio/Makefile src/cdaudio/cdaudio.c src/cdaudio/cdaudio.h src/cdaudio/cddb.c src/cdaudio/cddb.h src/cdaudio/cdinfo.c src/cdaudio/cdinfo.h src/cdaudio/configure.c src/cdaudio/http.c src/cdaudio/http.h |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wma/wma.c Sat Jul 28 00:08:41 2007 +0300 +++ b/src/wma/wma.c Fri Jul 27 16:20:15 2007 -0500 @@ -364,8 +364,8 @@ AVPacket pkt; g_static_mutex_lock(&wma_mutex); - while(wma_decode){ - + while(playback->playing) + { if(wma_seekpos != -1) { av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL); @@ -394,8 +394,7 @@ if(pkt.data) av_free_packet(&pkt); } } - while(wma_decode && playback->output->buffer_playing()) xmms_usleep(30000); - wma_decode = 0; + while(playback->playing && playback->output->buffer_playing()) xmms_usleep(30000); playback->playing = 0; if(wma_s_outbuf) g_free(wma_s_outbuf); if(wma_outbuf) g_free(wma_outbuf); @@ -403,7 +402,6 @@ if(c) avcodec_close(c); if(ic) av_close_input_file(ic); g_static_mutex_unlock(&wma_mutex); - g_thread_exit(NULL); return(NULL); } @@ -412,7 +410,7 @@ char *filename = playback->filename; AVCodec *codec; - if(av_open_input_file(&ic, str_twenty_to_space(filename), NULL, 0, NULL) < 0) return; + if(av_open_input_file(&ic, filename, NULL, 0, NULL) < 0) return; for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) { c = &ic->streams[wma_idx]->codec; @@ -443,7 +441,8 @@ wma_seekpos = -1; wma_decode = 1; playback->playing = 1; - wma_decode_thread = g_thread_create((GThreadFunc)wma_play_loop, playback, TRUE, NULL); + wma_decode_thread = g_thread_self(); + wma_play_loop(playback); } static void wma_stop(InputPlayback *playback)