summaryrefslogtreecommitdiff
path: root/libavformat/segafilm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-11-12 23:37:21 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2015-11-12 23:37:21 +0100
commit5324109dd7e1bfc0236bf74a492a66f26289d16e (patch)
tree1d1ffb2e87261fa0c6f712d5b2a20a36f864d3f2 /libavformat/segafilm.c
parent0106a20aeae868a4fa7a2eb6e11a6c67c83d4bfb (diff)
downloadffmpeg-5324109dd7e1bfc0236bf74a492a66f26289d16e.tar.gz
avformat/segafilm: Fix current_sample after seeking and avio_seek return type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/segafilm.c')
-rw-r--r--libavformat/segafilm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 86917e7821..94b377215e 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;