[FFmpeg-cvslog] asf: only set index_read if the index contained entries.
Ronald S. Bultje
git at videolan.org
Thu Mar 29 04:32:36 CEST 2012
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Mar 28 10:22:25 2012 -0700| [44257ef4267f01dd698c8ab8abf50fd77136a8ce] | committer: Ronald S. Bultje
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).
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44257ef4267f01dd698c8ab8abf50fd77136a8ce
---
libavformat/asfdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index d3869b4..f094647 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);
}
More information about the ffmpeg-cvslog
mailing list