Index: libavformat/mov.c =================================================================== --- ffmpeg.orig/libavformat/mov.c (revision 22950) +++ ffmpeg/libavformat/mov.c (working copy) @@ -2466,6 +2466,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;