diff options
author | lukem <lukem> | 2002-03-19 07:48:43 +0000 |
---|---|---|
committer | lukem <lukem> | 2002-03-19 07:48:43 +0000 |
commit | 328719c6ca4ae5a30fd21983488500c219aea3ad (patch) | |
tree | f70ad70c99562301e298c026c585c43beda5e166 /audio/vorbis-tools/patches | |
parent | 03279da7c5819c191c443f172b1d972a1ca3ecf1 (diff) | |
download | pkgsrc-328719c6ca4ae5a30fd21983488500c219aea3ad.tar.gz |
Add patches derived from the xiph.org CVS repository to fix ogg123 bugs in
1.0 rc3, and crank to nb1 whilst here:
- patch-aa:
the mutex and the condition variables are not owned by the buffer
thread, but by the buffer itself. don't destroy them when the thread
dies, but when the buffer itself dies. fixes #112.
[ patch suggested by Christian Weisgerber <naddy@mips.inka.de>
in private email ]
- patch-ab:
Some fixes to how audio writes are handled. Closes #127.
Diffstat (limited to 'audio/vorbis-tools/patches')
-rw-r--r-- | audio/vorbis-tools/patches/patch-aa | 30 | ||||
-rw-r--r-- | audio/vorbis-tools/patches/patch-ab | 28 |
2 files changed, 58 insertions, 0 deletions
diff --git a/audio/vorbis-tools/patches/patch-aa b/audio/vorbis-tools/patches/patch-aa new file mode 100644 index 00000000000..142541b93c4 --- /dev/null +++ b/audio/vorbis-tools/patches/patch-aa @@ -0,0 +1,30 @@ +$NetBSD: patch-aa,v 1.4 2002/03/19 07:48:44 lukem Exp $ + +--- ogg123/buffer.c.orig Thu Dec 20 11:24:53 2001 ++++ ogg123/buffer.c +@@ -85,12 +85,6 @@ + buf_t *buf = (buf_t *)arg; + + DEBUG("Enter buffer_thread_cleanup"); +- +- /* Cleanup thread data structures */ +- pthread_mutex_unlock(&buf->mutex); +- pthread_mutex_destroy(&buf->mutex); +- pthread_cond_destroy(&buf->playback_cond); +- pthread_cond_destroy(&buf->write_cond); + } + + +@@ -430,6 +424,12 @@ + void buffer_destroy (buf_t *buf) + { + DEBUG("buffer_destroy"); ++ ++ /* Cleanup pthread variables */ ++ pthread_mutex_destroy(&buf->mutex); ++ pthread_cond_destroy(&buf->write_cond); ++ pthread_cond_destroy(&buf->playback_cond); ++ + free(buf); + } + diff --git a/audio/vorbis-tools/patches/patch-ab b/audio/vorbis-tools/patches/patch-ab new file mode 100644 index 00000000000..8d497ea1875 --- /dev/null +++ b/audio/vorbis-tools/patches/patch-ab @@ -0,0 +1,28 @@ +$NetBSD: patch-ab,v 1.3 2002/03/19 07:48:45 lukem Exp $ + +--- ogg123/buffer.c.orig Tue Mar 19 18:02:36 2002 ++++ ogg123/buffer.c +@@ -232,7 +232,7 @@ + /* No need to lock mutex here because the other thread will + NEVER reduce the number of bytes stored in the buffer */ + DEBUG("Sending %d bytes to the audio device", write_amount); +- buf->write_func(buf->buffer + buf->start, write_amount, ++ write_amount = buf->write_func(buf->buffer + buf->start, write_amount, + /* Only set EOS if this is the last chunk */ + write_amount == buf->curfill ? buf->eos : 0, + buf->write_arg); + +--- ogg123/callbacks.c.orig Thu Dec 27 01:22:26 2001 ++++ ogg123/callbacks.c +@@ -30,7 +30,11 @@ + audio_play_arg_t *play_arg = (audio_play_arg_t *) arg; + int ret; + ++ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); ++ + ret = audio_devices_write(play_arg->devices, ptr, nbytes); ++ ++ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + + return ret ? nbytes : 0; + } |