changeset 31269:5eec425fdee2

Disable index reading in real demuxer if stream is not seekable. Fixes playback of piped real files (except multirate where this seems not possible).
author reimar
date Sun, 06 Jun 2010 11:08:46 +0000
parents 191f5098cfe6
children 5f777257f6af
files libmpdemux/demux_real.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_real.c	Sun Jun 06 08:32:17 2010 +0000
+++ b/libmpdemux/demux_real.c	Sun Jun 06 11:08:46 2010 +0000
@@ -1712,7 +1712,8 @@
 
     switch (index_mode){
 	case -1: // untouched
-	    if (priv->index_chunk_offset && parse_index_chunk(demuxer))
+	    if ((demuxer->stream->flags & MP_STREAM_SEEK) == MP_STREAM_SEEK &&
+                priv->index_chunk_offset && parse_index_chunk(demuxer))
 	    {
 		demuxer->seekable = 1;
 	    }