From 7b3a51f145902aa13a38d37f6f3a88a9dbde83c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Fri, 17 Feb 2017 01:19:00 +0100 Subject: [PATCH] libs: encoder: h265: bail if nal unit type fails Bail out if the NAL unit type is not recognized. https://bugzilla.gnome.org/show_bug.cgi?id=778782 --- gst-libs/gst/vaapi/gstvaapiencoder_h265.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c index a838d97f37..b657e0dee6 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c @@ -1625,7 +1625,8 @@ fill_picture (GstVaapiEncoderH265 * encoder, GstVaapiEncPicture * picture, pic_param->num_ref_idx_l1_default_active_minus1 = (ref_pool->max_reflist1_count ? (ref_pool->max_reflist1_count - 1) : 0); - get_nal_unit_type (picture, &nal_unit_type); + if (!get_nal_unit_type (picture, &nal_unit_type)) + return FALSE; pic_param->nal_unit_type = nal_unit_type; /* set picture fields */