]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/segafilm.c
Merge commit '9f57f134c19773d54269b6cb9ee455ff87c2e9e1'
[ffmpeg] / libavformat / segafilm.c
index 5e408db696fff24f5a1a798f128d17a201fb5bc4..94b377215e6ebd0775c1147be9f6e4451b5a5683 100644 (file)
@@ -280,8 +280,7 @@ static int film_read_packet(AVFormatContext *s,
     /* position the stream (will probably be there anyway) */
     avio_seek(pb, sample->sample_offset, SEEK_SET);
 
-
-    ret= av_get_packet(pb, pkt, sample->sample_size);
+    ret = av_get_packet(pb, pkt, sample->sample_size);
     if (ret != sample->sample_size)
         ret = AVERROR(EIO);
 
@@ -297,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;