1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/vorbis_parser: Move vp check

Fixes null pointer dereference
Fixes CID1251347

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-11-16 18:06:03 +01:00
parent 1de786777e
commit 374c907fb3

View File

@ -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;