index = av_index_search_timestamp(st, timestamp, flags & AVSEEK_FLAG_BACKWARD);
index = av_index_search_timestamp(st, timestamp, flags);
static int av_seek_frame_generic(AVFormatContext *s,                                  int stream_index, int64_t timestamp, int flags){    int index;    AVStream *st;    AVIndexEntry *ie;    if (!s->index_built) {        if (is_raw_stream(s)) {            av_build_index_raw(s);        } else {            return -1;        }        s->index_built = 1;    }    st = s->streams[stream_index];    index = av_index_search_timestamp(st, timestamp, flags & AVSEEK_FLAG_BACKWARD);    if (index < 0)        return -1;    /* now we have found the index, we can seek */    ie = &st->index_entries[index];    av_read_frame_flush(s);    url_fseek(&s->pb, ie->pos, SEEK_SET);    av_update_cur_dts(s, st, ie->timestamp);    return 0;}