# HG changeset patch # User michael # Date 1159286996 0 # Node ID 9e739042d95cba025c2752a2924dede9384f578a # Parent 024cf76ac4d155f299e6a803dddbf13bdbe5042c simplify seek() failure check diff -r 024cf76ac4d1 -r 9e739042d95c aviobuf.c --- a/aviobuf.c Tue Sep 26 03:41:51 2006 +0000 +++ b/aviobuf.c Tue Sep 26 16:09:56 2006 +0000 @@ -123,9 +123,6 @@ /* can do the seek inside the buffer */ s->buf_ptr = s->buffer + offset1; } else { - if (!s->seek) - return -EPIPE; - #ifdef CONFIG_MUXERS if (s->write_flag) { flush_buffer(s); @@ -136,7 +133,7 @@ s->buf_end = s->buffer; } s->buf_ptr = s->buffer; - if (s->seek(s->opaque, offset, SEEK_SET) == (offset_t)-EPIPE) + if (!s->seek || s->seek(s->opaque, offset, SEEK_SET) == (offset_t)-EPIPE) return -EPIPE; s->pos = offset; }