OSDN Git Service

ecfff65ce0e5e528629ae8a8423003822e6194e9
[handbrake-jp/handbrake-jp-git.git] / contrib / ffmpeg / A04-mov-seek.patch
1 Index: libavformat/mov.c
2 ===================================================================
3 --- ffmpeg.orig/libavformat/mov.c       (revision 22950)
4 +++ ffmpeg/libavformat/mov.c    (working copy)
5 @@ -2466,6 +2466,8 @@
6  
7      sample = av_index_search_timestamp(st, timestamp, flags);
8      dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
9 +    if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
10 +        sample = 0;
11      if (sample < 0) /* not sure what to do */
12          return -1;
13      sc->current_sample = sample;