[FFmpeg-devel] [PATCH 05/10] avformat/argo_brp: make sure stream ids match
Zane van Iperen
zane at zanevaniperen.com
Sun Sep 20 11:06:50 EEST 2020
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
---
libavformat/argo_brp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c
index 6c6e126b17..312eb23771 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;
--
2.25.4
More information about the ffmpeg-devel
mailing list