mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
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…
x
Reference in New Issue
Block a user