diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-19 03:31:25 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-19 03:31:25 -0700 |
commit | 548385ac6cc0bc344762e19117f94258e7ea2251 (patch) | |
tree | dcd2bae159f63d7a234d3ff740402aceea47dfcf /src/outputBuffer.h | |
parent | 3befb84a6a7a95de7e0e94c2f0bd9936ecb60668 (diff) | |
download | mpd-548385ac6cc0bc344762e19117f94258e7ea2251.tar.gz mpd-548385ac6cc0bc344762e19117f94258e7ea2251.tar.xz mpd-548385ac6cc0bc344762e19117f94258e7ea2251.zip |
fix output buffer deadlock when daemonizing
We spawned the output buffer thread before daemonizing in
initPlayerData(), which is ultra bad because daemonizes forks
and threads are not preserved on exit. Since playerData has
been stripped bare by this core-rewrite anyways, move this code
into the outputBuffer_* group and drop playerData.[ch]
completely
I completely forgot to test this :<
Diffstat (limited to 'src/outputBuffer.h')
-rw-r--r-- | src/outputBuffer.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/outputBuffer.h b/src/outputBuffer.h index 833a29e77..187846ef3 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -47,7 +47,7 @@ enum ob_action { /* 1020 bytes since its divisible for 8, 16, 24, and 32-bit audio */ #define CHUNK_SIZE 1020 -void ob_init(size_t size); +void ob_flush(void); enum ob_drop_type { OB_DROP_DECODED, OB_DROP_PLAYING }; void ob_drop_audio(enum ob_drop_type type); @@ -101,8 +101,9 @@ AudioFormat *ob_audio_format(void); void ob_advance_sequence(void); -void ob_wait_sync(void); - void ob_flush(void); +void config_output_buffer(void); +void init_output_buffer(void); + #endif |