diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-05-05 09:17:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-05-05 09:17:56 +0000 |
commit | abbae514e18bde2c24f9182cb1eb091dc2801331 (patch) | |
tree | 4e1d0bb8ef9a4bb13cecddb280e311fb845a98c3 /libavformat/avio.c | |
parent | 144783887cac832d55407c5843e780e095235aa6 (diff) | |
download | ffmpeg-streaming-abbae514e18bde2c24f9182cb1eb091dc2801331.zip ffmpeg-streaming-abbae514e18bde2c24f9182cb1eb091dc2801331.tar.gz |
Check url_seek() in url_open().
Originally committed as revision 13061 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index b6478c4..27a6a7f 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -113,6 +113,12 @@ int url_open(URLContext **puc, const char *filename, int flags) *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: |