diff options
author | Matthias Kretz <kretz@kde.org> | 2007-12-02 22:59:23 +0100 |
---|---|---|
committer | Matthias Kretz <kretz@kde.org> | 2007-12-02 22:59:23 +0100 |
commit | 5a7b7dcb302085db68a44f7f7acb6e4abbb73a75 (patch) | |
tree | c87c7b0e33be1d0b9deb49f3b3d477f9ec473fdc | |
parent | cad22619cdb867490ebfb59069f0aa472620edc5 (diff) | |
download | xine-lib-5a7b7dcb302085db68a44f7f7acb6e4abbb73a75.tar.gz xine-lib-5a7b7dcb302085db68a44f7f7acb6e4abbb73a75.tar.bz2 |
remove redundant check
buf must be != NULL because of the while(!fifo->first) before and the buf->next after
-rw-r--r-- | src/xine-engine/audio_out.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 7e43fb5cf..0c37b8d1f 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -358,22 +358,19 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { buf = fifo->first; - if (buf) { - fifo->first = buf->next; - - if (!fifo->first) { + fifo->first = buf->next; - fifo->last = NULL; - fifo->num_buffers = 0; - pthread_cond_signal (&fifo->empty); + if (!fifo->first) { - } else - fifo->num_buffers--; + fifo->last = NULL; + fifo->num_buffers = 0; + pthread_cond_signal (&fifo->empty); - } + } else + fifo->num_buffers--; buf->next = NULL; - + return buf; } |