Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Schreter <schreter@gmx.net>2009-09-13 12:57:30 +0400
committerIvan Schreter <schreter@gmx.net>2009-09-13 12:57:30 +0400
commitdbe0ad85c1722b67fc681fcf084b8f7afdd15adf (patch)
tree3f8f5605e565435865be273f092a77ea09b434b1 /libavformat/seek.c
parent749fac310c543dc435e5588c8eed1cf2ab55ae88 (diff)
Use I/O buffer size as initial value for backoff for seeking sync point search.
Originally committed as revision 19829 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/seek.c')
-rw-r--r--libavformat/seek.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/seek.c b/libavformat/seek.c
index 758767e229..93cb679f3c 100644
--- a/libavformat/seek.c
+++ b/libavformat/seek.c
@@ -342,8 +342,8 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s,
// Find keyframes in all active streams with timestamp/position just before
// and just after requested timestamp/position.
- step = 1024;
- curpos = pos;
+ step = s->pb->buffer_size;
+ curpos = FFMAX(pos - step / 2, 0);
for (;;) {
url_fseek(s->pb, curpos, SEEK_SET);
search_hi_lo_keyframes(s,