diff matroskadec.c @ 6114:10c9d304794f libavformat

Do not attempt to seek to index for streamed files and if the user explicitly requested us not to read the index.
author reimar
date Tue, 08 Jun 2010 19:31:08 +0000
parents 6f9d084d5888
children ad7cfe404294
line wrap: on
line diff
--- a/matroskadec.c	Tue Jun 08 19:28:22 2010 +0000
+++ b/matroskadec.c	Tue Jun 08 19:31:08 2010 +0000
@@ -1064,6 +1064,11 @@
     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;