oggenc: check return value of av_mallocz()

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/64/head
James Almer 11 years ago committed by Michael Niedermayer
parent 35617366b5
commit 0f62982335
  1. 3
      libavformat/oggenc.c

@ -427,6 +427,9 @@ static int ogg_write_header(AVFormatContext *s)
return -1;
}
oggstream = av_mallocz(sizeof(*oggstream));
if (!oggstream)
return AVERROR(ENOMEM);
oggstream->page.stream_index = i;
if (!(st->codec->flags & CODEC_FLAG_BITEXACT))

Loading…
Cancel
Save