summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-09-11 16:49:16 +0200
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>2015-09-22 13:42:27 +0200
commitf26a9a7a4bbaa9d6d585b997f6cd0d3293e406f9 (patch)
tree4d204b526ca5aeec4247431c8f0778b226da8be7
parentb69d2279dc992eea3be48423007053cbf69dfeac (diff)
downloadgst-vaapi-f26a9a7a4bbaa9d6d585b997f6cd0d3293e406f9.tar.gz
decoder: h264: initialize PPS's slice_group_id
When the GstVaapiParserInfoH264 is allocated, the memory is not initialized, so it contains random data. When gst_h264_parser_parse_pps() fails, the PPS structure keeps slice_group_id pointer uninitialized, leading to a segmentation fault when the memory is freed. This patch prevents this by initializing the slice_group_id before the PPS parsing. Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=754845
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index 677e73b7..ce64c417 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -1685,6 +1685,7 @@ parse_pps(GstVaapiDecoderH264 *decoder, GstVaapiDecoderUnit *unit)
standard but that should get a default value anyway */
pps->slice_group_map_type = 0;
pps->slice_group_change_rate_minus1 = 0;
+ pps->slice_group_id = NULL;
result = gst_h264_parser_parse_pps(priv->parser, &pi->nalu, pps);
if (result != GST_H264_PARSER_OK)