You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit 'c012c6f1a8b34828a7870dc1854422934f14b79a'
* commit 'c012c6f1a8b34828a7870dc1854422934f14b79a': segafilm: implement seeking Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
@@ -297,13 +297,15 @@ static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestam
|
|||||||
{
|
{
|
||||||
FilmDemuxContext *film = s->priv_data;
|
FilmDemuxContext *film = s->priv_data;
|
||||||
AVStream *st = s->streams[stream_index];
|
AVStream *st = s->streams[stream_index];
|
||||||
int index = av_index_search_timestamp(st, timestamp, flags);
|
int ret = av_index_search_timestamp(st, timestamp, flags);
|
||||||
if (index < 0)
|
if (ret < 0)
|
||||||
return -1;
|
return ret;
|
||||||
if (avio_seek(s->pb, st->index_entries[index].pos, SEEK_SET) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
film->current_sample = index;
|
ret = avio_seek(s->pb, st->index_entries[ret].pos, SEEK_SET);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
film->current_sample = ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user