Commit 374c907f authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vorbis_parser: Move vp check

Fixes null pointer dereference
Fixes CID1251347
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1de78677
......@@ -330,9 +330,9 @@ static int vorbis_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
if (!s->vp && avctx->extradata && avctx->extradata_size) {
s->vp = av_vorbis_parse_init(avctx->extradata, avctx->extradata_size);
if (!s->vp)
goto end;
}
if (!s->vp)
goto end;
if ((duration = av_vorbis_parse_frame(s->vp, buf, buf_size)) >= 0)
s1->duration = duration;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment