summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-12-16 17:52:46 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2007-12-16 17:52:46 +0000
commit5cb4b82a176e00cec9d7174a4bae07d194b8b61a (patch)
treeea90bcd4a772ad053a79d1520b9110f38f2f52cb
parent5d81d6417567d4194c8ec218aaf88f665e3ac195 (diff)
return error when url_fseek could not read until desired offset in streamed mode
Originally committed as revision 11233 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 328b53d336..88397778ba 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -139,6 +139,8 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
offset1 >= 0 && offset1 < (s->buf_end - s->buffer) + (1<<16)){
while(s->pos < offset && !s->eof_reached)
fill_buffer(s);
+ if (s->eof_reached)
+ return AVERROR(EPIPE);
s->buf_ptr = s->buf_end + offset - s->pos;
} else {
offset_t res = AVERROR(EPIPE);