@@ -1123,7 +1123,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
...
@@ -1123,7 +1123,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts
if(st->index_entries){
if(st->index_entries){
AVIndexEntry*e;
AVIndexEntry*e;
index=av_index_search_timestamp(st,target_ts,flags|AVSEEK_FLAG_BACKWARD);//FIXME whole func must be checked for nonkeyframe entries in index case, especially read_timestamp()
index=av_index_search_timestamp(st,target_ts,flags|AVSEEK_FLAG_BACKWARD);//FIXME whole func must be checked for non-keyframe entries in index case, especially read_timestamp()
index=FFMAX(index,0);
index=FFMAX(index,0);
e=&st->index_entries[index];
e=&st->index_entries[index];
...
@@ -1230,7 +1230,8 @@ int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, i
...
@@ -1230,7 +1230,8 @@ int64_t av_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, i
// bisection, if interpolation failed to change min or max pos last time
// bisection, if interpolation failed to change min or max pos last time
pos=(pos_min+pos_limit)>>1;
pos=(pos_min+pos_limit)>>1;
}else{
}else{
// linear search if bisection failed, can only happen if there are very few or no keframes between min/max
/* linear search if bisection failed, can only happen if there