aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-03-28 10:22:25 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-03-28 10:22:25 -0700
commit44257ef4267f01dd698c8ab8abf50fd77136a8ce (patch)
tree0d1356cda301c00d3bb4c1f7bc5f52f040d04fe9
parenta940198130de3ab0c50d832bf7a27a70cfed11cc (diff)
downloadffmpeg-44257ef4267f01dd698c8ab8abf50fd77136a8ce.tar.gz
asf: only set index_read if the index contained entries.
This allows falling back to a binary search if the file contains no index, thus fixing seeking in such files (e.g. luckynight.wma).
-rw-r--r--libavformat/asfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index d3869b427b..f094647ba0 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1235,7 +1235,7 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
last_pos=pos;
}
}
- asf->index_read= 1;
+ asf->index_read= ict > 0;
}
avio_seek(s->pb, current_pos, SEEK_SET);
}