[FFmpeg-cvslog] r14994 - trunk/libavformat/matroskadec.c
aurel
subversion
Wed Aug 27 21:57:42 CEST 2008
Author: aurel
Date: Wed Aug 27 21:57:42 2008
New Revision: 14994
Log:
matroskadec: seek to the last position known in the index before resorting to
full cluster parsing when seeking after the end of index
Modified:
trunk/libavformat/matroskadec.c
Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c (original)
+++ trunk/libavformat/matroskadec.c Wed Aug 27 21:57:42 2008
@@ -1655,11 +1655,15 @@ static int matroska_read_seek(AVFormatCo
if (timestamp < 0)
timestamp = 0;
+ if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
+ if (st->nb_index_entries)
+ url_fseek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
matroska_clear_queue(matroska);
if (matroska_parse_cluster(matroska) < 0)
break;
}
+ }
matroska_clear_queue(matroska);
if (index < 0)
More information about the ffmpeg-cvslog
mailing list