# HG changeset patch # User bcoudurier # Date 1278059077 0 # Node ID 525a4e7c0d304045ee1c0122ba7424d6f080b6be # Parent 0c4d80e5428ff3b22a4c82fde539db9923626015 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 diff -r 0c4d80e5428f -r 525a4e7c0d30 mov.c --- 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;