diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-09-26 16:09:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-09-26 16:09:56 +0000 |
commit | 3b9a913db4d303a0305a80de496b1933cba8980f (patch) | |
tree | da539c7c6d535875d38caac275ae6996a1fc6582 /libavformat/aviobuf.c | |
parent | 4156a436e37fb387da60fd919d6efa8ee71e1a0f (diff) | |
download | ffmpeg-streaming-3b9a913db4d303a0305a80de496b1933cba8980f.zip ffmpeg-streaming-3b9a913db4d303a0305a80de496b1933cba8980f.tar.gz |
simplify seek() failure check
Originally committed as revision 6339 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index e0832c6..ef72c19 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -123,9 +123,6 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence) /* 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 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence) 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; } |