diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index aca9db2bb9..97b2a637a2 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -385,7 +385,8 @@ static int mpegps_read_pes_header(AVFormatContext *s, if(dts != AV_NOPTS_VALUE && ppos){ int i; for(i=0; inb_streams; i++){ - if(startcode == s->streams[i]->id) { + if(startcode == s->streams[i]->id && + !url_is_streamed(s->pb) /* index useless on streams anyway */) { ff_reduce_index(s, i); av_add_index_entry(s->streams[i], *ppos, dts, 0, 0, AVINDEX_KEYFRAME /* FIXME keyframe? */); }