Make url_fseek() return AVERROR_EOF rather than AVERROR(EPIPE) if end

of file is reached.

Originally committed as revision 22590 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Stefano Sabatini 15 years ago
parent 8bab85e54c
commit 8d5e638f04
  1. 2
      libavformat/aviobuf.c

@ -156,7 +156,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
while(s->pos < offset && !s->eof_reached) while(s->pos < offset && !s->eof_reached)
fill_buffer(s); fill_buffer(s);
if (s->eof_reached) if (s->eof_reached)
return AVERROR(EPIPE); return AVERROR_EOF;
s->buf_ptr = s->buf_end + offset - s->pos; s->buf_ptr = s->buf_end + offset - s->pos;
} else { } else {
int64_t res = AVERROR(EPIPE); int64_t res = AVERROR(EPIPE);

Loading…
Cancel
Save