[FFmpeg-cvslog] r23966 - trunk/libavformat/mov.c

bcoudurier subversion
Fri Jul 2 10:24:37 CEST 2010


Author: bcoudurier
Date: Fri Jul  2 10:24:37 2010
New Revision: 23966

Log:
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

Modified:
   trunk/libavformat/mov.c

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Fri Jul  2 07:27:41 2010	(r23965)
+++ trunk/libavformat/mov.c	Fri Jul  2 10:24:37 2010	(r23966)
@@ -2496,6 +2496,8 @@ static int mov_seek_stream(AVFormatConte
 
     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;



More information about the ffmpeg-cvslog mailing list