]> git.sesse.net Git - ffmpeg/commitdiff
avformat/argo_brp: make sure stream ids match
authorZane van Iperen <zane@zanevaniperen.com>
Sat, 19 Sep 2020 12:10:45 +0000 (22:10 +1000)
committerZane van Iperen <zane@zanevaniperen.com>
Sun, 20 Sep 2020 09:21:01 +0000 (19:21 +1000)
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
libavformat/argo_brp.c

index bb7767479bcf6bb4e5d469763fa57ddc1395324b..fbc8dfd7e805d5004fb63b72e2aabff8f5873b5f 100644 (file)
@@ -184,6 +184,10 @@ static int argo_brp_read_header(AVFormatContext *s)
         hdr->byte_rate      = AV_RL32(buf + 12);
         hdr->extradata_size = AV_RL32(buf + 16);
 
+        /* This should always be the case. */
+        if (hdr->id != i)
+            return AVERROR_INVALIDDATA;
+
         /* Timestamps are in milliseconds. */
         avpriv_set_pts_info(st, 64, 1, 1000);
         st->duration           = hdr->duration_ms;