summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-06-08 19:31:08 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-06-08 19:31:08 +0000
commit120a083fb7125dbab3fce5b02be89f1b21b1dfdd (patch)
tree724d33f493bc29d63bef1bc716d912e86749c292 /libavformat/matroskadec.c
parentc31f00ed630877e4c0792fc93e19b969a45d52fb (diff)
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
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 75da12a3cc..6002c9ada0 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; i<seekhead_list->nb_elem; i++) {
int64_t offset = seekhead[i].pos + matroska->segment_start;