aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggparsevorbis.c
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2017-11-28 13:40:20 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-02 19:14:23 +0100
commit09494d098405738a5972e0052110af65b3ff7e72 (patch)
tree94d0065cdf42ceded0905ef870148d67e4d06567 /libavformat/oggparsevorbis.c
parent53c492640c6b4690715793372454194379093d21 (diff)
downloadffmpeg-09494d098405738a5972e0052110af65b3ff7e72.tar.gz
avformat/oggdec: Respect AVERROR codes returned by ogg parsers.
Fixes ticket #6804. All of the ogg header and packet parsers may return standard AVERROR codes; these return values should not be treated as success. Additionally changes oggparsevorbis, to not give up too early with certain types of poorly muxed files. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r--libavformat/oggparsevorbis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 65b1998a02..29b1ab514e 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -317,7 +317,7 @@ static int vorbis_header(AVFormatContext *s, int idx)
if (priv->packet[pkt_type >> 1])
return AVERROR_INVALIDDATA;
if (pkt_type > 1 && !priv->packet[0] || pkt_type > 3 && !priv->packet[1])
- return AVERROR_INVALIDDATA;
+ return priv->vp ? 0 : AVERROR_INVALIDDATA;
priv->len[pkt_type >> 1] = os->psize;
priv->packet[pkt_type >> 1] = av_mallocz(os->psize);