Mercurial > audlegacy-plugins
changeset 2029:c301531ffa5c
cope with seeks before the stream start point.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Fri, 12 Oct 2007 14:24:14 -0500 |
parents | 361ee83691e9 |
children | 32124206d46b |
files | src/neon/neon.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/neon/neon.c Thu Oct 11 15:43:25 2007 -0500 +++ b/src/neon/neon.c Fri Oct 12 14:24:14 2007 -0500 @@ -1187,9 +1187,12 @@ } _DEBUG("Position to seek to: %ld, current: %ld", newpos, h->pos); + + /* if seek <0, plugin probably wants the beginning of the stream. + cope with it. --nenolod */ if (0 > newpos) { - _ERROR("Can not seek before start of stream"); - _LEAVE -1; + _DEBUG("A seek was requested before start of stream, seeking to start of stream instead."); + newpos = 0; } if (newpos > content_length) {