diff --git a/libavformat/avio.c b/libavformat/avio.c index 5a1bb966be..7627f4a405 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -147,7 +147,7 @@ offset_t url_filesize(URLContext *h) offset_t pos, size; pos = url_seek(h, 0, SEEK_CUR); - size = url_seek(h, 0, SEEK_END); + size = url_seek(h, -1, SEEK_END)+1; url_seek(h, pos, SEEK_SET); return size; }