mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 14:00:43 +00:00
avformat/segafilm: Fix current_sample after seeking and avio_seek return type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0106a20aea
commit
5324109dd7
@ -296,13 +296,14 @@ 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];
|
||||||
|
int64_t pos;
|
||||||
int ret = av_index_search_timestamp(st, timestamp, flags);
|
int ret = av_index_search_timestamp(st, timestamp, flags);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = avio_seek(s->pb, st->index_entries[ret].pos, SEEK_SET);
|
pos = avio_seek(s->pb, st->index_entries[ret].pos, SEEK_SET);
|
||||||
if (ret < 0)
|
if (pos < 0)
|
||||||
return ret;
|
return pos;
|
||||||
|
|
||||||
film->current_sample = ret;
|
film->current_sample = ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user