Revision 70fa2486

View differences:

libavformat/tta.c
120 120
    return av_get_packet(&s->pb, pkt, size);
121 121
}
122 122

  
123
static int tta_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
124
{
125
    TTAContext *c = s->priv_data;
126
    AVStream *st = s->streams[stream_index];
127
    int index = av_index_search_timestamp(st, timestamp, flags);
128
    if (index < 0)
129
        return -1;
130

  
131
    c->currentframe = index;
132
    url_fseek(&s->pb, st->index_entries[index].pos, SEEK_SET);
133

  
134
    return 0;
135
}
136

  
123 137
AVInputFormat tta_demuxer = {
124 138
    "tta",
125 139
    "true-audio",
......
128 142
    tta_read_header,
129 143
    tta_read_packet,
130 144
    NULL,
145
    tta_read_seek,
131 146
    .extensions = "tta",
132 147
};

Also available in: Unified diff