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
This commit is contained in:

committed by
Baptiste Coudurier

parent
b3203b64c6
commit
8f42f5238e
@@ -172,7 +172,9 @@ offset_t url_fsize(ByteIOContext *s)
|
|||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
size = s->seek(s->opaque, 0, AVSEEK_SIZE);
|
size = s->seek(s->opaque, 0, AVSEEK_SIZE);
|
||||||
if(size<0){
|
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);
|
s->seek(s->opaque, s->pos, SEEK_SET);
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
|
Reference in New Issue
Block a user