aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZane van Iperen <zane@zanevaniperen.com>2020-09-19 22:10:45 +1000
committerZane van Iperen <zane@zanevaniperen.com>2020-09-20 19:21:01 +1000
commita68c91f6bcd4d6da6a437d1a29a2341b7011809d (patch)
tree6a2e1f3c68f402a9bcbf8502294dc2c256ccea4b
parente76102a2d8bce97885208657535f007b8cfd8217 (diff)
downloadffmpeg-a68c91f6bcd4d6da6a437d1a29a2341b7011809d.tar.gz
avformat/argo_brp: make sure stream ids match
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
-rw-r--r--libavformat/argo_brp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c
index bb7767479b..fbc8dfd7e8 100644
--- a/libavformat/argo_brp.c
+++ b/libavformat/argo_brp.c
@@ -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;