diff --git a/subprojects/gst-plugins-bad/sys/va/gstvah265dec.c b/subprojects/gst-plugins-bad/sys/va/gstvah265dec.c index 05d55fc202..4494446930 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvah265dec.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvah265dec.c @@ -315,6 +315,9 @@ _get_reference_index (GstH265Decoder * decoder, GstH265Picture * picture) GstVaH265Dec *self = GST_VA_H265_DEC (decoder); guint8 i; + if (!picture) + return 0xFF; + for (i = 0; i < 15; i++) { VAPictureHEVC *ref_va_pic = &self->pic_param.base.ReferenceFrames[i];