1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Originally committed as revision 23966 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
John Stebbins 2010-07-02 08:24:37 +00:00 committed by Baptiste Coudurier
parent dcc602d802
commit 380966a801

View File

@ -2496,6 +2496,8 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp,
sample = av_index_search_timestamp(st, timestamp, flags); sample = av_index_search_timestamp(st, timestamp, flags);
dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample); 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 */ if (sample < 0) /* not sure what to do */
return -1; return -1;
sc->current_sample = sample; sc->current_sample = sample;