Mercurial > libavformat.hg
diff mov.c @ 6213:525a4e7c0d30 libavformat
In mov demuxer, fix seeking to the beginning when file has edit lists.
Patch by John Stebbins, stebbins at jetheaddev dot com
Fixes issue #2046
author | bcoudurier |
---|---|
date | Fri, 02 Jul 2010 08:24:37 +0000 |
parents | 6f6ecca6904a |
children | fceb0e489495 |
line wrap: on
line diff
--- a/mov.c Thu Jul 01 23:21:23 2010 +0000 +++ b/mov.c Fri Jul 02 08:24:37 2010 +0000 @@ -2496,6 +2496,8 @@ sample = av_index_search_timestamp(st, timestamp, flags); dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); + if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp) + sample = 0; if (sample < 0) /* not sure what to do */ return -1; sc->current_sample = sample;