1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

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:
Ronald S. Bultje 2007-01-28 02:38:02 +00:00 committed by Baptiste Coudurier
parent b3203b64c6
commit 8f42f5238e

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;