changeset 5171:44e53fe2e9ca libavformat

Use I/O buffer size as initial value for backoff for seeking sync point search.
author schreter
date Sun, 13 Sep 2009 08:57:30 +0000
parents 80a367a3742c
children 06b0c8fd923f
files seek.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/seek.c	Thu Sep 10 19:12:13 2009 +0000
+++ b/seek.c	Sun Sep 13 08:57:30 2009 +0000
@@ -342,8 +342,8 @@
 
     // 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,