diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c index 25427adc0d..349d6d23b3 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c @@ -795,7 +795,7 @@ gst_h264_slice_parse_pred_weight_table (GstH264SliceHdr * slice, p->chroma_weight_l0[i][1] = default_chroma_weight; } if (GST_H264_IS_B_SLICE (slice)) { - for (i = 0; i <= slice->num_ref_idx_l0_active_minus1; i++) { + for (i = 0; i <= slice->num_ref_idx_l1_active_minus1; i++) { p->chroma_weight_l1[i][0] = default_chroma_weight; p->chroma_weight_l1[i][1] = default_chroma_weight; }