changeset 2816:1523342b58b3 libavformat

return error when url_fseek could not read until desired offset in streamed mode
author bcoudurier
date Sun, 16 Dec 2007 17:52:46 +0000
parents 64cf0a2303ac
children b1b21255bbbb
files aviobuf.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/aviobuf.c	Sun Dec 16 17:22:09 2007 +0000
+++ b/aviobuf.c	Sun Dec 16 17:52:46 2007 +0000
@@ -139,6 +139,8 @@
               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);