aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-06 12:58:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-06 13:02:08 +0100
commitc04c43b3e423d0426162828e7b180e4d0014a3f7 (patch)
tree8eb8e8c8349f637b371e171808d30da89c56df03 /libavformat
parent4b2763cd1354484b7ddec95e6509869d906f3b69 (diff)
downloadffmpeg-c04c43b3e423d0426162828e7b180e4d0014a3f7.tar.gz
avformat/oggparsevorbis: Check that initialization succeeded before declaring the end of headers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/oggparsevorbis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 87b8190d0e..dd44337437 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -304,14 +304,14 @@ static int vorbis_header(AVFormatContext *s, int idx)
return AVERROR(ENOMEM);
}
+ priv = os->private;
+
if (!(pkt_type & 1))
- return 0;
+ return priv->vp ? 0 : AVERROR_INVALIDDATA;
if (os->psize < 1 || pkt_type > 5)
return AVERROR_INVALIDDATA;
- priv = os->private;
-
if (priv->packet[pkt_type >> 1])
return AVERROR_INVALIDDATA;
if (pkt_type > 1 && !priv->packet[0] || pkt_type > 3 && !priv->packet[1])