diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index 132ffee9c2..4856c1786b 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/libavcodec/aac/aacdec_usac.c @@ -348,6 +348,9 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, int map_pos_set = 0; uint8_t layout_map[MAX_ELEM_ID*4][3] = { 0 }; + if (!ac) + return AVERROR_PATCHWELCOME; + memset(usac, 0, sizeof(*usac)); freq_idx = get_bits(gb, 5); /* usacSamplingFrequencyIndex */