static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)

{

    TTAContext *c = s->priv_data;

    AVStream *st = s->streams[stream_index];

    int index = av_index_search_timestamp(st, timestamp, flags);

    if (index < 0)

        return -1;



    c->currentframe = index;

    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);



    return 0;

}

static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)

{

    TTAContext *c = s->priv_data;

    AVStream *st = s->streams[stream_index];

    int index = av_index_search_timestamp(st, timestamp, flags);

    if (index < 0)

        return -1;



    c->currentframe = index;

    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);



    return 0;

}

    avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET);
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)

{

    TTAContext *c = VAR_0->priv_data;

    AVStream *st = VAR_0->streams[VAR_1];

    int VAR_4 = av_index_search_timestamp(st, VAR_2, VAR_3);

    if (VAR_4 < 0)

        return -1;



    c->currentframe = VAR_4;

    avio_seek(VAR_0->pb, st->index_entries[VAR_4].pos, SEEK_SET);



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, int VAR_1, int64_t VAR_2, int VAR_3)
{ TTAContext *c = VAR_0->priv_data; AVStream *st = VAR_0->streams[VAR_1]; int VAR_4 = av_index_search_timestamp(st, VAR_2, VAR_3); if (VAR_4 < 0)
return -1; c->currentframe = VAR_4; avio_seek(VAR_0->pb, st->index_entries[VAR_4].pos, SEEK_SET); return 0; }