[FFmpeg-devel] [PATCH] fix matroska decoder for streamed input

Reimar Döffinger Reimar.Doeffinger
Sat Jun 5 18:24:40 CEST 2010

the matroska demuxer will attempt seeking when reading the seekhead stuff.
This completely messes up playing from stdin - well, at least within
I since this is a non-essential part, IMO it should be skipped for
the url_is_streamed case, as in below patch.
Objections to applying it?

Index: libavformat/matroskadec.c
--- libavformat/matroskadec.c   (revision 23468)
+++ libavformat/matroskadec.c   (working copy)
@@ -1063,6 +1063,10 @@
     MatroskaLevel level;
     int i;
+    // we should not do any seeking in the streaming case
+    if (url_is_streamed(matroska->ctx->pb))
+        return;
     for (i=0; i<seekhead_list->nb_elem; i++) {
         int64_t offset = seekhead[i].pos + matroska->segment_start;

More information about the ffmpeg-devel mailing list