From 120a083fb7125dbab3fce5b02be89f1b21b1dfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Tue, 8 Jun 2010 19:31:08 +0000 Subject: Do not attempt to seek to index for streamed files and if the user explicitly requested us not to read the index. Originally committed as revision 23540 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskadec.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libavformat/matroskadec.c') diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 75da12a..6002c9a 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1064,6 +1064,11 @@ static void matroska_execute_seekhead(MatroskaDemuxContext *matroska) MatroskaLevel level; int i; + // we should not do any seeking in the streaming case + if (url_is_streamed(matroska->ctx->pb) || + (matroska->ctx->flags & AVFMT_FLAG_IGNIDX)) + return; + for (i=0; inb_elem; i++) { int64_t offset = seekhead[i].pos + matroska->segment_start; -- cgit v1.1