summaryrefslogtreecommitdiff
path: root/libavformat/siff.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/siff.c')
-rw-r--r--libavformat/siff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/siff.c b/libavformat/siff.c
index f6815b2f26..60a867df14 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -201,6 +201,8 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (c->curstrm == -1) {
c->pktsize = avio_rl32(s->pb) - 4;
c->flags = avio_rl16(s->pb);
+ if (c->flags & VB_HAS_AUDIO && !c->has_audio)
+ return AVERROR_INVALIDDATA;
c->gmcsize = (c->flags & VB_HAS_GMC) ? 4 : 0;
if (c->gmcsize)
avio_read(s->pb, c->gmc, c->gmcsize);