From 6ba90c204c4921ba72602d734bb17111851baaed Mon Sep 17 00:00:00 2001 From: Michel Bardiaux Date: Mon, 14 Jan 2008 16:11:08 +0000 Subject: [PATCH] Suppress runaway index on streamed input Originally committed as revision 11527 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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? */); }