blob: ecfff65ce0e5e528629ae8a8423003822e6194e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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;
|