From 3edd64166708efb0d861dde5f9169e3ff17d2197 Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Wed, 25 May 2016 16:57:49 -0700 Subject: [PATCH] h265parse: Don't assume contiguous id's in make_codec_data vps/sps/pps id's are not required to be used contiguously. https://bugzilla.gnome.org/show_bug.cgi?id=766891 --- gst/videoparsers/gsth265parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index f56b995f20..7954793f8f 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -1144,7 +1144,7 @@ gst_h265_parse_make_codec_data (GstH265Parse * h265parse) GST_WRITE_UINT16_BE (data, num_vps); data += 2; - for (i = 0; i < num_vps; i++) { + for (i = 0; i < GST_H265_MAX_VPS_COUNT; i++) { if ((nal = h265parse->vps_nals[i])) { gsize nal_size = gst_buffer_get_size (nal); GST_WRITE_UINT16_BE (data, nal_size); @@ -1163,7 +1163,7 @@ gst_h265_parse_make_codec_data (GstH265Parse * h265parse) GST_WRITE_UINT16_BE (data, num_sps); data += 2; - for (i = 0; i < num_sps; i++) { + for (i = 0; i < GST_H265_MAX_SPS_COUNT; i++) { if ((nal = h265parse->sps_nals[i])) { gsize nal_size = gst_buffer_get_size (nal); GST_WRITE_UINT16_BE (data, nal_size); @@ -1182,7 +1182,7 @@ gst_h265_parse_make_codec_data (GstH265Parse * h265parse) GST_WRITE_UINT16_BE (data, num_pps); data += 2; - for (i = 0; i < num_pps; i++) { + for (i = 0; i < GST_H265_MAX_PPS_COUNT; i++) { if ((nal = h265parse->pps_nals[i])) { gsize nal_size = gst_buffer_get_size (nal); GST_WRITE_UINT16_BE (data, nal_size);