OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9f62a8
)
cache: Fallback to using the cache size for AVSEEK_SIZE if the underlaying protocol...
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 14:54:27 +0000
(16:54 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 15:12:37 +0000
(17:12 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/cache.c
patch
|
blob
|
history
diff --git
a/libavformat/cache.c
b/libavformat/cache.c
index
bbc8592
..
c08250b
100644
(file)
--- a/
libavformat/cache.c
+++ b/
libavformat/cache.c
@@
-95,7
+95,14
@@
static int64_t cache_seek(URLContext *h, int64_t pos, int whence)
Context *c= h->priv_data;
if (whence == AVSEEK_SIZE) {
- return ffurl_seek(c->inner, pos, whence);
+ pos= ffurl_seek(c->inner, pos, whence);
+ if(pos <= 0){
+ pos= ffurl_seek(c->inner, -1, SEEK_END);
+ ffurl_seek(c->inner, c->end, SEEK_SET);
+ if(pos <= 0)
+ return c->end;
+ }
+ return pos;
}
pos= lseek(c->fd, pos, whence);