1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Suppress runaway index on streamed input

Originally committed as revision 11527 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michel Bardiaux 2008-01-14 16:11:08 +00:00
parent 363728ea0e
commit 6ba90c204c

View File

@ -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? */);
}