codecparsers: h264: fix parsing of slice groups for map type = 2.

When parsing slice groups information for slice_group_map_type = 2, we
should only be reading up to num_slice_groups_minus1 groups since there
is always a "leftover" slice group and as many "foreground" slice groups
as needed.

This fixes parsing for SVCBMT-5 and SVCBMT-12 whereby the base layer would
have incorrectly been parsed to have up to 38 reference frames in list0,
which is not possible.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
Gwenole Beauchesne 2014-04-27 23:29:41 +02:00
parent 4e9036690c
commit a66f2dca60

View file

@ -1466,7 +1466,7 @@ gst_h264_parse_pps (GstH264NalParser * nalparser, GstH264NalUnit * nalu,
} else if (pps->slice_group_map_type == 2) {
gint i;
for (i = 0; i <= pps->num_slice_groups_minus1; i++) {
for (i = 0; i < pps->num_slice_groups_minus1; i++) {
READ_UE (&nr, pps->top_left[i]);
READ_UE (&nr, pps->bottom_right[i]);
}