[SCM] libav/experimental: 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

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:09:59 UTC 2013


The following commit has been merged in the experimental branch:
commit 380966a8018514ea021c9e3c77437384faf7faaa
Author: John Stebbins <stebbins at jetheaddev.com>
Date:   Fri Jul 2 08:24:37 2010 +0000

    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

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;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list