diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-13 13:32:13 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-11-14 03:39:44 +0100 |
commit | 2fb6e1e754f38ddd6eba0738f287e5b9ddc3777d (patch) | |
tree | db6bacee86a9b150802b21b7635773abb61f5658 /libavformat | |
parent | 62b4a6f1b9aa83d56701af226adda98faa5ede09 (diff) | |
download | ffmpeg-2fb6e1e754f38ddd6eba0738f287e5b9ddc3777d.tar.gz |
segafilm: Fix current_sample after seeking and avio_seek return type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/segafilm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index 256c474d47..5516019d77 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -296,13 +296,14 @@ static int film_read_seek(AVFormatContext *s, int stream_index, int64_t timestam { FilmDemuxContext *film = s->priv_data; AVStream *st = s->streams[stream_index]; + int64_t pos; 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; + pos = avio_seek(s->pb, st->index_entries[ret].pos, SEEK_SET); + if (pos < 0) + return pos; film->current_sample = ret; |