avcodec/hevc_parser: check for av_mallocz() failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2015-02-09 13:14:45 +00:00
parent 078be09dd7
commit a5398aa56c

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;