]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bink.c
Merge commit 'a1c699659d56b76c0bf399307f642c6fd6d28281'
[ffmpeg] / libavformat / bink.c
index 94990a2479d39739b351c199f1b5eb7ac2f174e3..ec9257bca287d817fbf5409b109a1bef2ae3bc75 100644 (file)
@@ -81,6 +81,7 @@ static int read_header(AVFormatContext *s)
     uint32_t pos, next_pos;
     uint16_t flags;
     int keyframe;
+    int ret;
 
     vst = avformat_new_stream(s, NULL);
     if (!vst)
@@ -184,8 +185,9 @@ static int read_header(AVFormatContext *s)
             av_log(s, AV_LOG_ERROR, "invalid frame index table\n");
             return AVERROR(EIO);
         }
-        av_add_index_entry(vst, pos, i, next_pos - pos, 0,
-                           keyframe ? AVINDEX_KEYFRAME : 0);
+        if ((ret = av_add_index_entry(vst, pos, i, next_pos - pos, 0,
+                                      keyframe ? AVINDEX_KEYFRAME : 0)) < 0)
+            return ret;
     }
 
     avio_seek(pb, vst->index_entries[0].pos, SEEK_SET);