diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-10-13 23:58:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-13 23:58:28 +0000 |
commit | 528c2c737ee58f6bec22ff515adbefca87d13a0b (patch) | |
tree | 83bae19f1f2531f3ac0f0355615dcc844df16620 | |
parent | 6e1f8725ef499daf6d41ccef9b66ce3a1c4bdf2a (diff) | |
download | ffmpeg-528c2c737ee58f6bec22ff515adbefca87d13a0b.tar.gz |
fix assertion failure in case of timestamp discontinuities
Originally committed as revision 3592 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 5554948806..672c43e204 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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 |