diff options
author | Michel Bardiaux <mbardiaux@mediaxim.be> | 2008-01-14 16:11:08 +0000 |
---|---|---|
committer | Michel Bardiaux <mbardiaux@mediaxim.be> | 2008-01-14 16:11:08 +0000 |
commit | 6ba90c204c4921ba72602d734bb17111851baaed (patch) | |
tree | be4b62893fa0cc2e998d87427aafe4be06db0ded /libavformat/mpeg.c | |
parent | 363728ea0e11b206cd8d92c73981bd2567e4f3bd (diff) | |
download | ffmpeg-6ba90c204c4921ba72602d734bb17111851baaed.tar.gz |
Suppress runaway index on streamed input
Originally committed as revision 11527 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r-- | libavformat/mpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; i<s->nb_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? */); } |