Commit a5398aa5 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/hevc_parser: check for av_mallocz() failure

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 078be09d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment