X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fvda_h264_dec.c;h=972bd6bbd6441b9ee755b938a3c416bdd83b81c3;hb=55eab1733b9e730ceac33edce9aab56c17ea87b2;hp=92839e2d39368f03bf24ce0892f5a7c4586236e9;hpb=0bd76401d1666bf8f0a67946d761ed9ba4751e49;p=ffmpeg diff --git a/libavcodec/vda_h264_dec.c b/libavcodec/vda_h264_dec.c index 92839e2d393..972bd6bbd64 100644 --- a/libavcodec/vda_h264_dec.c +++ b/libavcodec/vda_h264_dec.c @@ -226,7 +226,7 @@ static av_cold int vdadec_init(AVCodecContext *avctx) ctx->h264_initialized = 1; for (i = 0; i < MAX_SPS_COUNT; i++) { - const SPS *sps = (const SPS*)ctx->h264ctx.ps.sps_list[i]->data; + const SPS *sps = ctx->h264ctx.ps.sps_list[i] ? (const SPS*)ctx->h264ctx.ps.sps_list[i]->data : NULL; if (sps && (sps->bit_depth_luma != 8 || sps->chroma_format_idc == 2 || sps->chroma_format_idc == 3)) {