[SCM] libav/experimental: Dont try generic seek if seek request before first index entry and backward. Fixes issue1275

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:59:23 UTC 2013


The following commit has been merged in the experimental branch:
commit 8c3b161e9ea74013b38ea1985ffda07473978d16
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Wed Feb 3 23:59:48 2010 +0000

    Dont try generic seek if seek request before first index entry and backward.
    Fixes issue1275
    
    Originally committed as revision 21633 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/utils.c b/libavformat/utils.c
index eec7a62..58606b0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1548,6 +1548,9 @@ static int av_seek_frame_generic(AVFormatContext *s,
 
     index = av_index_search_timestamp(st, timestamp, flags);
 
+    if(index < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
+        return -1;
+
     if(index < 0 || index==st->nb_index_entries-1){
         int i;
         AVPacket pkt;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list