diff options
author | Max Kellermann <max@duempel.org> | 2011-01-10 20:46:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-01-10 20:46:04 +0100 |
commit | b77e62260aa1f3d36d742d947610c13f235bb67a (patch) | |
tree | 9be88302670f1913027595215552eafc83bac4d9 /src/player_thread.c | |
parent | b6995ca0113611613d311250eabfc354658d46a7 (diff) | |
download | mpd-b77e62260aa1f3d36d742d947610c13f235bb67a.tar.gz mpd-b77e62260aa1f3d36d742d947610c13f235bb67a.tar.xz mpd-b77e62260aa1f3d36d742d947610c13f235bb67a.zip |
decoder_control: replace dc_init() with dc_new()
dc_new() allocates the object and returns it. dc_free() frees it
(replaces dc_deinit()).
Diffstat (limited to '')
-rw-r--r-- | src/player_thread.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index d51263477..6be7b8884 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -1023,10 +1023,9 @@ static gpointer player_task(gpointer arg) { struct player_control *pc = arg; - struct decoder_control dc; - dc_init(&dc, pc); - decoder_thread_start(&dc); + struct decoder_control *dc = dc_new(pc); + decoder_thread_start(dc); player_buffer = music_buffer_new(pc->buffer_chunks); @@ -1037,7 +1036,7 @@ player_task(gpointer arg) case PLAYER_COMMAND_QUEUE: assert(pc->next_song != NULL); - do_play(pc, &dc); + do_play(pc, dc); break; case PLAYER_COMMAND_STOP: @@ -1081,8 +1080,8 @@ player_task(gpointer arg) case PLAYER_COMMAND_EXIT: player_unlock(pc); - dc_quit(&dc); - dc_deinit(&dc); + dc_quit(dc); + dc_free(dc); audio_output_all_close(); music_buffer_free(player_buffer); |