mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/hevc_parser: check for av_mallocz() failure
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
078be09dd7
commit
a5398aa56c
|
@ -309,6 +309,8 @@ static int hevc_init(AVCodecParserContext *s)
|
||||||
{
|
{
|
||||||
HEVCContext *h = &((HEVCParseContext *)s->priv_data)->h;
|
HEVCContext *h = &((HEVCParseContext *)s->priv_data)->h;
|
||||||
h->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
|
h->HEVClc = av_mallocz(sizeof(HEVCLocalContext));
|
||||||
|
if (!h->HEVClc)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
h->skipped_bytes_pos_size = INT_MAX;
|
h->skipped_bytes_pos_size = INT_MAX;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue