diff options
author | John Stebbins <stebbins@jetheaddev.com> | 2010-07-02 08:24:37 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2010-07-02 08:24:37 +0000 |
commit | 380966a8018514ea021c9e3c77437384faf7faaa (patch) | |
tree | f246bfda7f54e500706f0983f7e457d1695ce40f /libavformat/mov.c | |
parent | dcc602d8022aac4d419038d6020e07584011aa8a (diff) | |
download | ffmpeg-streaming-380966a8018514ea021c9e3c77437384faf7faaa.zip ffmpeg-streaming-380966a8018514ea021c9e3c77437384faf7faaa.tar.gz |
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
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index b6feb68..dfed5dc 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2496,6 +2496,8 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, 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; |