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:
0588aca
)
avformat/http: always allow no-op seek
author
Anssi Hannula
<anssi.hannula@iki.fi>
Mon, 30 Dec 2013 10:46:32 +0000
(12:46 +0200)
committer
Anssi Hannula
<anssi.hannula@iki.fi>
Fri, 3 Jan 2014 13:05:48 +0000
(15:05 +0200)
This also allows checking stream position as per ffurl_seek() doxy.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
libavformat/http.c
patch
|
blob
|
history
diff --git
a/libavformat/http.c
b/libavformat/http.c
index
fd29966
..
3b655c6
100644
(file)
--- a/
libavformat/http.c
+++ b/
libavformat/http.c
@@
-947,6
+947,8
@@
static int64_t http_seek(URLContext *h, int64_t off, int whence)
if (whence == AVSEEK_SIZE)
return s->filesize;
+ else if ((whence == SEEK_CUR && off == 0) || (whence == SEEK_SET && off == s->off))
+ return s->off;
else if ((s->filesize == -1 && whence == SEEK_END) || h->is_streamed)
return -1;