Browse Source

proper error handling in file size retrieval, patch by Ronald S. Bultje rbultje at ronald bitfreak net

Originally committed as revision 7736 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Ronald S. Bultje Baptiste Coudurier 18 years ago
parent
commit
8f42f5238e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/aviobuf.c

+ 3
- 1
libavformat/aviobuf.c View File

@@ -172,7 +172,9 @@ offset_t url_fsize(ByteIOContext *s)
return -EPIPE;
size = s->seek(s->opaque, 0, AVSEEK_SIZE);
if(size<0){
size = s->seek(s->opaque, -1, SEEK_END) + 1;
if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)
return size;
size++;
s->seek(s->opaque, s->pos, SEEK_SET);
}
return size;


Loading…
Cancel
Save