avformat/avidec: Speed up keyframe detection code
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 22 Apr 2014 02:00:32 +0000 (04:00 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Wed, 23 Apr 2014 15:22:06 +0000 (17:22 +0200)
Fixes Ticket3531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57fb570908df2e84b11635f12b5be1fb27f053eb)

Conflicts:
libavformat/avidec.c

libavformat/avidec.c

index 6bd6446..e3a153a 100644 (file)
@@ -1198,7 +1198,7 @@ resync:
                 int index;
                 av_assert0(st->index_entries);
 
-                index= av_index_search_timestamp(st, ast->frame_offset, 0);
+                index= av_index_search_timestamp(st, ast->frame_offset, AVSEEK_FLAG_ANY);
                 e= &st->index_entries[index];
 
                 if(index >= 0 && e->timestamp == ast->frame_offset){