1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

fix assertion failure in case of timestamp discontinuities

Originally committed as revision 3592 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2004-10-13 23:58:28 +00:00
parent 6e1f8725ef
commit 528c2c737e

View File

@ -932,7 +932,8 @@ int av_add_index_entry(AVStream *st,
}else{
ie= &entries[index];
if(ie->timestamp != timestamp){
assert(ie->timestamp > timestamp);
if(ie->timestamp <= timestamp)
return -1;
memmove(entries + index + 1, entries + index, sizeof(AVIndexEntry)*(st->nb_index_entries - index));
st->nb_index_entries++;
}else if(ie->pos == pos && distance < ie->min_distance) //dont reduce the distance