diff avio.c @ 1612:a6eaa0762191 libavformat

seekless filesize retrieving support in 7 lines of code, also doesnt break compatibility
author michael
date Mon, 01 Jan 2007 21:49:09 +0000
parents 0899bfe4105c
children 387dc458ba37
line wrap: on
line diff
--- a/avio.c	Mon Jan 01 21:17:14 2007 +0000
+++ b/avio.c	Mon Jan 01 21:49:09 2007 +0000
@@ -148,9 +148,12 @@
 {
     offset_t pos, size;
 
+    size= url_seek(h, 0, AVSEEK_SIZE);
+    if(size<0){
     pos = url_seek(h, 0, SEEK_CUR);
     size = url_seek(h, -1, SEEK_END)+1;
     url_seek(h, pos, SEEK_SET);
+    }
     return size;
 }