Browse Source

avcodec/hevc_parser: check for av_mallocz() failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.6
Paul B Mahol 11 years ago
parent
commit
a5398aa56c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/hevc_parser.c

+ 2
- 0
libavcodec/hevc_parser.c View File

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