aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-26 22:48:55 +0200
committerMax Kellermann <max@duempel.org>2013-09-26 22:48:55 +0200
commit92a93c1217732bfe5a2f93099abf031051ccb5be (patch)
treefa088bf74f71dec889a9f414571280f34464c355 /src
parent96b70835f98d904fb633b239371abc82e112165b (diff)
downloadmpd-92a93c1217732bfe5a2f93099abf031051ccb5be.tar.gz
mpd-92a93c1217732bfe5a2f93099abf031051ccb5be.tar.xz
mpd-92a93c1217732bfe5a2f93099abf031051ccb5be.zip
PlayerThread: allocate decoder_control on the stack
Diffstat (limited to 'src')
-rw-r--r--src/PlayerThread.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index 086675b3a..0086c797a 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -1107,8 +1107,8 @@ player_task(gpointer arg)
{
struct player_control *pc = (struct player_control *)arg;
- struct decoder_control *dc = new decoder_control();
- decoder_thread_start(dc);
+ decoder_control dc;
+ decoder_thread_start(&dc);
MusicBuffer buffer(pc->buffer_chunks);
@@ -1120,7 +1120,7 @@ player_task(gpointer arg)
case PLAYER_COMMAND_QUEUE:
assert(pc->next_song != NULL);
- do_play(pc, dc, buffer);
+ do_play(pc, &dc, buffer);
break;
case PLAYER_COMMAND_STOP:
@@ -1161,8 +1161,8 @@ player_task(gpointer arg)
case PLAYER_COMMAND_EXIT:
pc->Unlock();
- dc->Quit();
- delete dc;
+ dc.Quit();
+
audio_output_all_close();
player_command_finished(pc);