# HG changeset patch # User michael # Date 1209979076 0 # Node ID ce8070648576d832ce82fee28d7d08eeabe72258 # Parent 24284961452b0c505a9fed4819729550006bf2e9 Check url_seek() in url_open(). diff -r 24284961452b -r ce8070648576 avio.c --- a/avio.c Sun May 04 10:35:13 2008 +0000 +++ b/avio.c Mon May 05 09:17:56 2008 +0000 @@ -113,6 +113,12 @@ *puc = NULL; return err; } + + //We must be carefull here as url_seek() could be slow, for example for http + if( (flags & (URL_WRONLY | URL_RDWR)) + || !strcmp(proto_str, "file")) + if(!uc->is_streamed && url_seek(uc, 0, SEEK_SET) < 0) + uc->is_streamed= 1; *puc = uc; return 0; fail: