Commit 5a9daeeb authored by michael's avatar michael

simplify seek() failure check


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6339 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 067a5979
...@@ -123,9 +123,6 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence) ...@@ -123,9 +123,6 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
/* can do the seek inside the buffer */ /* can do the seek inside the buffer */
s->buf_ptr = s->buffer + offset1; s->buf_ptr = s->buffer + offset1;
} else { } else {
if (!s->seek)
return -EPIPE;
#ifdef CONFIG_MUXERS #ifdef CONFIG_MUXERS
if (s->write_flag) { if (s->write_flag) {
flush_buffer(s); flush_buffer(s);
...@@ -136,7 +133,7 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence) ...@@ -136,7 +133,7 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
s->buf_end = s->buffer; s->buf_end = s->buffer;
} }
s->buf_ptr = 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; return -EPIPE;
s->pos = offset; s->pos = offset;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment