Originally committed as revision 7395 to svn://svn.ffmpeg.org/ffmpeg/trunk
{
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;
}
/* not implemented */
int url_poll(URLPollEntry *poll_table, int n, int timeout);
+#define AVSEEK_SIZE 0x10000
+
typedef struct URLProtocol {
const char *name;
int (*url_open)(URLContext *h, const char *filename, int flags);
if (!s->seek)
return -EPIPE;
+ size = s->seek(s->opaque, 0, AVSEEK_SIZE);
+ if(size<0){
size = s->seek(s->opaque, -1, SEEK_END) + 1;
s->seek(s->opaque, s->pos, SEEK_SET);
+ }
return size;
}