avcodec/hevc_parser: check for av_mallocz() failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/111/head
Paul B Mahol 10 years ago
parent 078be09dd7
commit a5398aa56c
  1. 2
      libavcodec/hevc_parser.c

@ -309,6 +309,8 @@ static int hevc_init(AVCodecParserContext *s)
{
HEVCContext *h = &((HEVCParseContext *)s->priv_data)->h;
h->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
if (!h->HEVClc)
return AVERROR(ENOMEM);
h->skipped_bytes_pos_size = INT_MAX;
return 0;

Loading…
Cancel
Save