From 0a8cd4cfec6b23600322b12de08e033433556637 Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Fri, 18 Apr 2008 12:25:41 +0200 Subject: [PATCH] --- yaml --- r: 92232 b: refs/heads/master c: 0d52cea487c0213d6d7bca9c951210081e7b653b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/oss/dmabuf.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 67fcdb02c1d0..567fc7883a61 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e34ba212225a27cdf5f974be22cc539ae7ee7ca5 +refs/heads/master: 0d52cea487c0213d6d7bca9c951210081e7b653b diff --git a/trunk/sound/oss/dmabuf.c b/trunk/sound/oss/dmabuf.c index eaf69971bf92..1e90d769b62e 100644 --- a/trunk/sound/oss/dmabuf.c +++ b/trunk/sound/oss/dmabuf.c @@ -795,9 +795,9 @@ static int find_output_space(int dev, char **buf, int *size) #ifdef BE_CONSERVATIVE active_offs = dmap->byte_counter + dmap->qhead * dmap->fragment_size; #else - active_offs = DMAbuf_get_buffer_pointer(dev, dmap, DMODE_OUTPUT); + active_offs = max(DMAbuf_get_buffer_pointer(dev, dmap, DMODE_OUTPUT), 0); /* Check for pointer wrapping situation */ - if (active_offs < 0 || active_offs >= dmap->bytes_in_use) + if (active_offs >= dmap->bytes_in_use) active_offs = 0; active_offs += dmap->byte_counter; #endif