Commit 8f42f523 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Baptiste Coudurier

proper error handling in file size retrieval, patch by Ronald S. Bultje...

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
parent b3203b64
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment