projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1447838
)
Check url_seek() in url_open().
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 5 May 2008 09:17:56 +0000
(09:17 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 5 May 2008 09:17:56 +0000
(09:17 +0000)
Originally committed as revision 13061 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/avio.c
patch
|
blob
|
blame
|
history
diff --git
a/libavformat/avio.c
b/libavformat/avio.c
index
b6478c4
..
27a6a7f
100644
(file)
--- 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: