Commit b3453f44 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit 'c012c6f1'

* commit 'c012c6f1':
  segafilm: implement seeking
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 43266457 c012c6f1
......@@ -297,13 +297,15 @@ static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestam
{
FilmDemuxContext *film = s->priv_data;
AVStream *st = s->streams[stream_index];
int index = av_index_search_timestamp(st, timestamp, flags);
if (index < 0)
return -1;
if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
return -1;
int ret = av_index_search_timestamp(st, timestamp, flags);
if (ret < 0)
return ret;
ret = avio_seek(s->pb, st->index_entries[ret].pos, SEEK_SET);
if (ret < 0)
return ret;
film->current_sample = index;
film->current_sample = ret;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment